Preparations for a moderator role

This commit is contained in:
Michael 2023-08-10 21:06:08 +00:00
parent 41bc148040
commit 0a45bdd3b7
5 changed files with 31 additions and 4 deletions

View file

@ -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
*