Preparations for a moderator role
This commit is contained in:
@@ -880,6 +880,20 @@ class User
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the given uid is valid and a moderator
|
||||
*
|
||||
* @param int $uid
|
||||
*
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function isModerator(int $uid): bool
|
||||
{
|
||||
// @todo Replace with a moderator check in the future
|
||||
return self::isSiteAdmin($uid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a nickname is in the list of the forbidden nicknames
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user