Manual:Hooks/SpecialPasswordResetOnSubmit

From MediaWiki.org
Jump to navigation Jump to search
SpecialPasswordResetOnSubmit
Available from version 1.18.0 (r86482)
Called when executing a form submission on Special:PasswordReset.
Define function:
public static function onSpecialPasswordResetOnSubmit( $users, $data, &$error ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SpecialPasswordResetOnSubmit": "MyExtensionHooks::onSpecialPasswordResetOnSubmit"
	}
}

For MediaWiki ≤1.25:

$wgHooks['SpecialPasswordResetOnSubmit'][] = 'MyExtensionHooks::onSpecialPasswordResetOnSubmit';
Called from: File(s): SpecialPasswordReset.php

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

Details[edit]

  • $users: array of User objects
  • $data: array of data submitted by the user
  • &$error: string, error code (message name) used to describe to error (out parameter). The hook needs to return false when setting this, otherwise it will have no effect.