UserModule
About 1 min
UserModule
Console commands for managing the Warlock server process.
class UserModule extends \Hazaar\Console\ModuleExtends: Hazaar\Console\Module
Properties
authenticator
private Basic $authenticatorType: Hazaar\Warlock\Server\Auth\Basic
Methods
configure
Registers server CLI commands and options.
public configure(): voidReturns: void
addUser
Adds a user to the authentication database.
public addUser(Input $input, Output $output): intReturns: int
Prompts for missing username or password input when not provided via CLI.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Hazaar\Console\Input | Console input containing username argument and password option |
$output | Hazaar\Console\Output | Console output used to display status messages |
removeUser
Removes a user from the authentication database.
public removeUser(Input $input, Output $output): intReturns: int
Prompts for confirmation unless the --yes/-y option is provided.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Hazaar\Console\Input | Console input containing username argument and options |
$output | Hazaar\Console\Output | Console output used to display status messages |
listUsers
Lists all users currently stored in the authentication database.
public listUsers(Input $input, Output $output): intReturns: int
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Hazaar\Console\Input | Console input (unused) |
$output | Hazaar\Console\Output | Console output used to display users |
testCanAuthenticate
Tests whether the provided credentials can authenticate.
public testCanAuthenticate(Input $input, Output $output): intReturns: int
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Hazaar\Console\Input | Console input containing username and password arguments |
$output | Hazaar\Console\Output | Console output used to display the authentication result |
prepare
Prepares the module by initializing the authenticator with the specified database file.
protected prepare(Input $input, Output $output): intReturns: int
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Hazaar\Console\Input | |
$output | Hazaar\Console\Output |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:18 +0000