From: Evan Prodromou Date: Sun, 8 Nov 2009 00:16:54 +0000 (-0500) Subject: use upper-case constants for roles and rights in hasRight() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=38833af6f18ae48caed0cc7939803c89e3104ef9;p=quix0rs-gnu-social.git use upper-case constants for roles and rights in hasRight() --- diff --git a/classes/User.php b/classes/User.php index 96a64ccb29..546406f71e 100644 --- a/classes/User.php +++ b/classes/User.php @@ -705,10 +705,12 @@ class User extends Memcached_DataObject if (Event::handle('UserRightsCheck', array($this, $right, &$result))) { switch ($right) { - case Right::deleteOthersNotice: - $result = $this->hasRole('moderator'); + case Right::DELETEOTHERSNOTICE: + $result = $this->hasRole(User_role::MODERATOR); break; - default: + case Right::CONFIGURESITE: + $result = $this->hasRole(User_role::ADMINISTRATOR); + default: $result = false; break; }