| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Mail\Hook; |
| 4 | |
| 5 | use MediaWiki\Permissions\Authority; |
| 6 | use StatusValue; |
| 7 | |
| 8 | /** |
| 9 | * This is a hook handler interface, see docs/Hooks.md. |
| 10 | * Use the hook name "EmailUserAuthorizeSend" to register handlers implementing this interface. |
| 11 | * |
| 12 | * @stable to implement |
| 13 | * @ingroup Hooks |
| 14 | * @since 1.41 |
| 15 | */ |
| 16 | interface EmailUserAuthorizeSendHook { |
| 17 | /** |
| 18 | * This hook is called when checking whether a user is allowed to send emails. |
| 19 | * |
| 20 | * @param Authority $sender |
| 21 | * @param StatusValue $status Add any error here |
| 22 | * @return bool|void True or no return value to continue, false to abort, which also requires adding |
| 23 | * a fatal error to $status. |
| 24 | */ |
| 25 | public function onEmailUserAuthorizeSend( Authority $sender, StatusValue $status ); |
| 26 | } |