< Manual:Hooks
![]() | This feature was removed from MediaWiki core in version 1.33.0 (after being deprecated in 1.27.0). Please see MediaWiki\Auth\PreAuthenticationProvider for an alternative way to use this feature. |
LoginUserMigrated | |
---|---|
Available from version 1.26.0 Removed in version 1.33.0 allows extensions to inform a user that their username doesn't exist for a specific reason | |
Define function: | public static function onLoginUserMigrated( User $user, &$msg ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"LoginUserMigrated": "MyExtensionHooks::onLoginUserMigrated"
}
}
|
Called from: | File(s): user/User.php |
Interface: | LoginUserMigratedHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:LoginUserMigrated extensions.
Details
This allows providing a reason to the user why their username doesn't exist, instead of letting the login form give the generic error message that the account does not exist. For example, when the account has been renamed or deleted.
$user
: The User object being authenticated against.&$msg
: The message identifier for abort reason, or an array to pass a message key and parameters.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.