Property | Type | Description | |
---|---|---|---|
$passwordHelper | |||
$usersManagerApi |
Method | Description | |
---|---|---|
__construct ( |
Constructor. | |
confirmNewPassword ( string $login, string $resetToken ) | Confirms a password reset. This should be called after {@link initiatePasswordResetProcess()} is called. | |
generatePasswordResetToken ( array $user, integer | null $expiryTimestamp = null ) : string | Generate a password reset token. Expires in 24 hours from the beginning of the current hour. | |
getPasswordResetInfoOptionName ( string $login ) : string | Gets the option name for the option that will store a user's password change request. | |
initiatePasswordResetProcess ( string $loginOrEmail, string $newPassword ) | Initiates the password reset process. This method will save the password reset information as an {@link Option} and send an email with the reset confirmation link to the user whose password is being reset. | |
isTokenValid ( string $token, array $user ) : boolean | Returns true if a reset token is valid, false if otherwise. A reset token is valid if it exists and has not expired. | |
removePasswordResetInfo ( string $login ) | Removes stored password reset info if it exists. |
Method | Description | |
---|---|---|
checkNewPassword ( string $newPassword ) | Checks the reset password's complexity. Will use UsersManager's requirements for user passwords. | |
checkPasswordHash ( string $passwordHash ) | Checks the password hash that was retrieved from the Option table. Used as a sanity check when finishing the reset password process. If a password is obviously malformed, changing a user's password to it will keep the user from being able to login again. | |
generateSecureHash ( string $hashIdentifier, string $data ) : string | Generates a hash using a hash "identifier" and some data to hash. The hash identifier is a string that differentiates the hash in some way. | |
getDefaultExpiryTime ( ) : integer | Returns an expiration time from the current time. By default it will be one day (24 hrs) from now. | |
getSalt ( ) : string | Returns the string salt to use when generating a secure hash. Defaults to the value of the [General] salt INI config option. | |
getUserInformation ( $loginOrMail ) : array | Returns user information based on a login or email. | |
hashData ( string $data ) : string | Hashes a string. |
Method | Description | |
---|---|---|
getPasswordToResetTo ( string $login ) : string | false | Gets password hash stored in password reset info. | |
savePasswordResetInfo ( string $login, string $newPassword ) | Stores password reset info for a specific login. | |
sendEmailConfirmationLink ( array $user ) | Sends email confirmation link for a password reset request. |
public __construct ( |
||
$usersManagerApi | ||
$confirmPasswordModule | string | null | |
$confirmPasswordAction | string | null | |
$emailFromName | string | null | |
$emailFromAddress | string | null | |
$passwordHelper |
protected checkNewPassword ( string $newPassword ) | ||
$newPassword | string | The password to check. |
protected checkPasswordHash ( string $passwordHash ) | ||
$passwordHash | string | The password hash to check. |
public confirmNewPassword ( string $login, string $resetToken ) | ||
$login | string | The login of the user whose password is being reset. |
$resetToken | string | The generated string token contained in the reset password email. |
protected generateSecureHash ( string $hashIdentifier, string $data ) : string | ||
$hashIdentifier | string | A unique string that identifies the hash in some way, can, for example, be user information or can contain an expiration date, or whatever. |
$data | string | Any data that needs to be hashed securely, ie, a password. |
return | string | The hash string. |
protected getDefaultExpiryTime ( ) : integer | ||
return | integer |
public static getPasswordResetInfoOptionName ( string $login ) : string | ||
$login | string | The user login for whom a password change was requested. |
return | string |
protected getUserInformation ( $loginOrMail ) : array | ||
return | array | `array("login" => '...', "email" => '...', "password" => '...')` or null, if user not found. |
public initiatePasswordResetProcess ( string $loginOrEmail, string $newPassword ) | ||
$loginOrEmail | string | The user's login or email address. |
$newPassword | string | The un-hashed/unencrypted password. |
public removePasswordResetInfo ( string $login ) | ||
$login | string | The user login to check for. |
protected Password,Piwik\Auth $passwordHelper | ||
return |