summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 291e6202b..fde40240f 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -195,10 +195,8 @@ class Notice extends Memcached_DataObject
' take a breather and post again in a few minutes.'));
}
- $banned = common_config('profile', 'banned');
-
- if ( in_array($profile_id, $banned) || in_array($profile->nickname, $banned)) {
- common_log(LOG_WARNING, "Attempted post from banned user: $profile->nickname (user id = $profile_id).");
+ if (!$profile->hasRight(Right::NEWNOTICE)) {
+ common_log(LOG_WARNING, "Attempted post from user disallowed to post: " . $profile->nickname);
throw new ClientException(_('You are banned from posting notices on this site.'));
}