Nextcloud PHP API (master)

GenerateSecurePasswordEvent extends Event
in package

Event to request a secure password to be generated

Tags
since
18.0.0

Table of Contents

Properties

$context  : PasswordContext
$password  : string|null
$propagationStopped  : bool

Methods

__construct()  : mixed
Request a secure password to be generated.
getContext()  : PasswordContext
Get the context this password should generated for.
getPassword()  : string|null
Get the generated password.
isPropagationStopped()  : bool
{@inheritDoc}
setPassword()  : void
Set the generated password.
stopPropagation()  : void
Stops the propagation of the event to further event listeners

Properties

$propagationStopped

private bool $propagationStopped = false
Tags
since
22.0.0

Methods

__construct()

Request a secure password to be generated.

public __construct([PasswordContext $context = PasswordContext::ACCOUNT ]) : mixed

By default passwords are generated for the user account context, this can be adjusted by passing another PasswordContext.

Parameters
$context : PasswordContext = PasswordContext::ACCOUNT
Tags
since
31.0.0

getPassword()

Get the generated password.

public getPassword() : string|null

If a password generator is registered and successfully generated a password that password can get read back. Otherwise null is returned.

Tags
since
18.0.0
Return values
string|null

isPropagationStopped()

{@inheritDoc}

public isPropagationStopped() : bool
Tags
since
22.0.0
see
StoppableEventInterface
Return values
bool

setPassword()

Set the generated password.

public setPassword(string $password) : void

This is used by password generators to set the generated password.

Parameters
$password : string
Tags
since
18.0.0

stopPropagation()

Stops the propagation of the event to further event listeners

public stopPropagation() : void
Tags
since
22.0.0

        
On this page

Search results