PasswordChangeEvent¶
The PSR-14 event \TYPO3\CMS\FrontendLogin\Event\PasswordChangeEvent
contains information about the password that has been set and will be
stored in the database shortly.
Note
You can find a basic example implementation of a listener to this event in the chapter Listen to an event.
Deprecated since version 12.4: The PasswordChangeEvent
should not be used to validate user passwords,
since it is not possible to visualize to the user why a password has been
rejected. Therefore the following methods of the event are deprecated:
->setAsInvalid()
->getErrorMessage()
->isPropagationStopped()
->setHashedPassword()
A custom password policy validator should be used to validate user passwords.
Example¶
Note
Currently, we do not have an example for this event. If you can provide a useful one, please open an issue with your code snippets or a pull request.
API¶
- class TYPO3\CMS\FrontendLogin\Event\PasswordChangeEvent¶
Informal event that contains information about the password which was set, and is about to be stored in the database.
- getUser()¶
- Return type
array
- getHashedPassword()¶
- Return type
string
- setHashedPassword(string $passwordHash)¶
Deprecated: will be removed in TYPO3 13
- Parameters
$passwordHash (
string
) -- the passwordHash
- getRawPassword()¶
- Return type
string
- setAsInvalid(string $message)¶
Deprecated: will be removed in TYPO3 13
- Parameters
$message (
string
) -- the message
- getErrorMessage()¶
Deprecated: will be removed in TYPO3 13
- Return type
string
- isPropagationStopped()¶
Deprecated: will be removed in TYPO3 13
- Return type
bool