MediaWiki master
MediaWiki\User\Hook\UserCanSendEmailHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onUserCanSendEmail ( $user, &$hookErr)
 Use this hook to override User::canSendEmail() permission check.
 

Detailed Description

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

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

Deprecated
since 1.41, handle the EmailUserAuthorizeSend hook instead.

Definition at line 14 of file UserCanSendEmailHook.php.

Member Function Documentation

◆ onUserCanSendEmail()

MediaWiki\User\Hook\UserCanSendEmailHook::onUserCanSendEmail ( $user,
& $hookErr )

Use this hook to override User::canSendEmail() permission check.

Since
1.35
Parameters
User$userUser (object) whose permission is being checked
bool | string | array&$hookErrOut-param for the error. Passed as the parameters to OutputPage::showErrorPage.
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: