aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Permissions/Hook/UserGetRightsRemoveHook.php
blob: babbcff8cb3cabc80311d2bc8d4aa9f30e2f86fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

namespace MediaWiki\Permissions\Hook;

use User;

/**
 * This is a hook handler interface, see docs/Hooks.md.
 * Use the hook name "UserGetRightsRemove" to register handlers implementing this interface.
 *
 * @stable to implement
 * @ingroup Hooks
 */
interface UserGetRightsRemoveHook {
	/**
	 * This hook is called in PermissionManager::getUserPermissions(). This hook
	 * overrides the UserGetRights hook. It can be used to remove rights from a user
	 * and ensure that they will not be reinserted by the other hook callbacks.
	 * This hook should not be used to add any rights; use UserGetRights instead.
	 *
	 * @since 1.35
	 *
	 * @param User $user User to get rights for
	 * @param string[] &$rights Current rights
	 * @return bool|void True or no return value to continue or false to abort
	 */
	public function onUserGetRightsRemove( $user, &$rights );
}