Available from version 1.11.0
Override the result of User::isValidPassword()
Define function:
public static function onisValidPassword( $password, &$result, $user ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"isValidPassword": "MyExtensionHooks::onisValidPassword"
Called from: File(s): User.php
Interface: isValidPasswordHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:isValidPassword extensions.


  • $password: Desired password.
  • &$result: Set this and return false to override the internal checks.
  • $user: User the password is being validated for.