< Manual:Hooks
UserCanSendEmail | |
---|---|
Available from version 1.12.0 Allows overriding the permission check in User::canSendEmail() | |
Define function: | public static function onUserCanSendEmail( $user, &$canSend ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"UserCanSendEmail": "MyExtensionHooks::onUserCanSendEmail"
}
}
|
Called from: | File(s): user/User.php |
Interface: | UserCanSendEmailHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:UserCanSendEmail extensions.
Details
- $user: User (object) whose permission is being checked
- &$canSend: bool set on input, can override on output
By default, users can send email if email sending is enabled, they have the sendemail
right, and they pass an email confirmed check.
See also
- userCan
- EmailConfirmed
- $wgEnableEmail
- $wgEnableUserEmail
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.