Available from version 1.26.0 (Gerrit change 206156)
Alter the effective password policy for a user.
Define function:
public static function onPasswordPoliciesForUser( $user, &$effectivePolicy ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"PasswordPoliciesForUser": "MediaWiki\\Extension\\MyExtension\\Hooks::onPasswordPoliciesForUser"
Called from: File(s): password/UserPasswordPolicy.php
Function(s): getPoliciesForUser
Interface: PasswordPoliciesForUserHook.php

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

Details edit

  • $user: User object whose policy you are modifying
  • &$effectivePolicy: Array of policy statements that apply to this user