Manual:Hooks/ResetPasswordExpiration
From Linux Web Expert
ResetPasswordExpiration | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 92037)</tvar></translate> Allow extensions to set a default password expiration | |
<translate> Define function:</translate> | public static function onResetPasswordExpiration( User $user, &$newExpire ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"ResetPasswordExpiration": "MediaWiki\\Extension\\MyExtension\\Hooks::onResetPasswordExpiration"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> auth/AbstractPasswordPrimaryAuthenticationProvider.php <translate> Function(s):</translate> getNewPasswordExpiry |
<translate> Interface:</translate> | ResetPasswordExpirationHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ResetPasswordExpiration extensions</tvar>.</translate>
Details
$user
: The user having their password expiration reset&$newExpire
: The new expiration date. This is equal to either int, false, or null.