< Manual:Hooks
UserIsLocked
Available from version 1.26.0
Check if the user is locked. See User::isLocked().
Define function:
public static function onUserIsLocked( $user, &$locked ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserIsLocked": "MyExtensionHooks::onUserIsLocked"
	}
}
Called from: File(s): user/User.php
Function(s): isLocked
Interface: UserIsLockedHook.php

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

Notes

This hook was addded in MediaWiki 1.26 as part of the AuthManager system. This replaced the method call to AuthPluginUser::isLocked(), where the AuthPluginUser class was removed in MediaWiki 1.27.

Parameters

  • $user: An instance of User, representing the the user in question.
  • &$locked: A modifiable bool representing whether the user is currently locked. Set this to true if the user should be locked.

See also

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.