summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/classes/User.php b/classes/User.php
index bea81af4d..3f7ed09bb 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -726,15 +726,18 @@ class User extends Memcached_DataObject
function hasRight($right)
{
- switch ($right)
- {
- case Right::deleteOthersNotice:
- return $this->hasRole('moderator');
- break;
- default:
- $result = false;
- Event::handle('UserRightsCheck', array($this, &$result));
- return $result;
+ $result = false;
+ if (Event::handle('UserRightsCheck', array($this, $right, &$result))) {
+ switch ($right)
+ {
+ case Right::deleteOthersNotice:
+ $result = $this->hasRole('moderator');
+ break;
+ default:
+ $result = false;
+ break;
+ }
}
+ return $result;
}
}