UserModule
Less than 1 minute
UserModule
Console commands for managing the Warlock server process.
class UserModule extends \Hazaar\Warlock\Console\ModuleProperties
authenticator
private Basic $authenticatorMethods
configure
Registers server CLI commands and options.
public configure(): voidaddUser
Adds a user to the authentication database.
public addUser(Input $input, Output $output): intPrompts for missing username or password input when not provided via CLI.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Input | Console input containing username argument and password option |
$output | Output | Console output used to display status messages |
removeUser
Removes a user from the authentication database.
public removeUser(Input $input, Output $output): intPrompts for confirmation unless the --yes/-y option is provided.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Input | Console input containing username argument and options |
$output | Output | Console output used to display status messages |
listUsers
Lists all users currently stored in the authentication database.
public listUsers(Input $input, Output $output): intParameters
| Parameter | Type | Description |
|---|---|---|
$input | Input | Console input (unused) |
$output | Output | Console output used to display users |
testCanAuthenticate
Tests whether the provided credentials can authenticate.
public testCanAuthenticate(Input $input, Output $output): intParameters
| Parameter | Type | Description |
|---|---|---|
$input | Input | Console input containing username and password arguments |
$output | 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): intParameters
| Parameter | Type | Description |
|---|---|---|
$input | Input | |
$output | Output |
Generated by Hazaar API Doc Generator on Fri, 05 Jun 2026 06:08:15 +0000