Manual:Hooks/ApiValidatePassword
ApiValidatePassword | |
---|---|
Available from version 1.29.0 (Gerrit change 324968) This will allow for checking passwords against the wiki's password policy from the account creation and password change forms. | |
Define function: | public static function onApiValidatePassword( &$r ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"ApiValidatePassword": "MediaWiki\\Extension\\MyExtension\\Hooks::onApiValidatePassword"
}
}
|
Called from: | File(s): api/ApiValidatePassword.php |
Interface: | ApiValidatePasswordHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ApiValidatePassword extensions.
Parameters
edit&$r
: Result array.