WinterPasswd

Console command to change the password of a Backend user via CLI.

 class Backend\Console\WinterPasswd
extends Winter\Storm\Console\Command
implements 
    Symfony\Component\Console\Command\SignalableCommandInterface

Traits

Trait Description
HandlesCleanup

Console Command Trait that injects cross-platform signal handling to trigger cleanup on exit through the handleCleanup() method on the implementing class.

ProvidesAutocompletion

Console Command Trait that injects cross-platform signal handling to trigger cleanup on exit through the handleCleanup() method on the implementing class.

Properties

protected static $defaultName : string | null

The default command name for lazy loading.

protected $description : string

The console command description.

protected $generatedPassword : bool

Was the password automatically generated?

protected $replaces : array

List of commands that this command replaces (aliases)

protected $signature : string

The name and signature of this command.

Methods

public __construct ()

Create a new command instance.

Returns
mixed

public handle () : int

Execute the console command.

Returns
int

public suggestUsernameValues () : array

Return the 20 most recently updated users for autocompletion of the "username" argument

Returns
array

protected generatePassword () : string

Generate a password and flag it as an automatically-generated password.

Returns
string

protected optionalSecret (string $question, boolean $fallback = true, $default = null) : string

Prompt the user for input but hide the answer from the console.

Also allows for a default to be specified.

Parameters
Property Description
$question
string
$fallback
boolean
$default
mixed
Returns
string

public alert (string $string, int | string | null $verbosity = null) : void

Inherited from Command

Write a string in an alert box.

Parameters
Property Description
$string
string
$verbosity
int | string | null
Returns
void

public complete (Symfony\Component\Console\Completion\CompletionInput $input, Symfony\Component\Console\Completion\CompletionSuggestions $suggestions) : void

Provide autocompletion for this command's input

Parameters
Property Description
$input
Symfony\Component\Console\Completion\CompletionInput
$suggestions
Symfony\Component\Console\Completion\CompletionSuggestions
Returns
void

public error (string $string, int | string | null $verbosity = null) : void

Inherited from Command

Write a string as error output.

Parameters
Property Description
$string
string
$verbosity
int | string | null
Returns
void

public getSubscribedSignals () : array

Inherited from HandlesCleanup

Returns the process signals this command listens to

Returns
array

public handleSignal (integer $signal) : integer | false

Inherited from HandlesCleanup

Handle the provided Unix process signal

Parameters
Property Description
$signal
integer
Returns
integer | false

public handleWindowsSignal (integer $event) : void

Inherited from HandlesCleanup

Handle the provided Windows process singal.

Parameters
Property Description
$event
integer
Returns
void
Copyright © 2024 Winter CMS