User
Less than 1 minute
User
Trait User.
trait UserProvides methods for managing database users, including listing, creating, and dropping users. Intended for use in DBI adapters supporting SQL user operations.
Methods
listUsers
List all users in the database.
public listUsers(): voidcreateUser
Create a new user in the database.
public createUser(string $name, ?string $password, array $privileges): boolParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the user to create |
$password | string | optional password for the user |
$privileges | array | list of privileges to assign to the user |
dropUser
Drop a user from the database.
public dropUser(string $name, bool $ifExists): boolParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the user to drop |
$ifExists | bool | if true, only drops the user if they exist |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000