MediaWiki master
MediaWiki\User\Hook\SpecialPasswordResetOnSubmitHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onSpecialPasswordResetOnSubmit (&$users, $data, &$error)
 This hook is called when executing a form submission on Special:PasswordReset.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "SpecialPasswordResetOnSubmit" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 15 of file SpecialPasswordResetOnSubmitHook.php.

Member Function Documentation

◆ onSpecialPasswordResetOnSubmit()

MediaWiki\User\Hook\SpecialPasswordResetOnSubmitHook::onSpecialPasswordResetOnSubmit ( & $users,
$data,
& $error )

This hook is called when executing a form submission on Special:PasswordReset.

The data submitted by the user ($data) is an associative array with the keys 'Username' and 'Email', whose values are already validated user input (a valid username, and a valid email address), or null if not given by the user. At least one of the values is not null.

Since MediaWiki 1.43, hook handlers should check each user's 'requireemail' preference, and if it is enabled by the user, only return that user if both username and email were present. Until MediaWiki 1.42 only one of username and email could be present (the other would be null).

Since
1.35
Parameters
User[]&$users
array$dataArray of data submitted by the user
string | array | MessageSpecifier&$errorString, error code (message key) used to describe to error (out parameter). The hook needs to return false when setting this, otherwise it will have no effect.
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: