User
Less than 1 minute
User
Methods
listUsers
List all users in the database.
public listUsers(): void
createUser
Create a new user in the database.
public createUser(string $name, ?string $password, array $privileges = []): bool
Parameters
Parameter | Type | Description |
---|---|---|
$name | string | |
$password | string | |
$privileges | array |
dropUser
Drop a user from the database.
public dropUser(string $name, bool $ifExists = false): bool
Parameters
Parameter | Type | Description |
---|---|---|
$name | string | |
$ifExists | bool |
grant
Change the password for a user.
public grant(string $role, string $to, string $on): bool
Parameters
Parameter | Type | Description |
---|---|---|
$role | string | |
$to | string | |
$on | string |
revoke
Revoke a role from a user.
public revoke(string $role, string $from, string $on): bool
Parameters
Parameter | Type | Description |
---|---|---|
$role | string | |
$from | string | |
$on | string |
Generated by Hazaar API Doc Generator