Merge pull request #13336 from annando/moderator

Preparations for a moderator role
This commit is contained in:
Hypolite Petovan
2023-08-10 23:17:43 +02:00
committed by GitHub
6 changed files with 245 additions and 208 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
*