silenced users can't send direct messages
This commit is contained in:
parent
e9321a1806
commit
440af7ed7a
@ -39,6 +39,12 @@ class Message extends Memcached_DataObject
|
|||||||
|
|
||||||
static function saveNew($from, $to, $content, $source) {
|
static function saveNew($from, $to, $content, $source) {
|
||||||
|
|
||||||
|
$sender = Profile::staticGet('id', $from);
|
||||||
|
|
||||||
|
if (!$sender->hasRight(Right::NEWMESSAGE)) {
|
||||||
|
throw new ClientException(_('You are banned from sending direct messages.'));
|
||||||
|
}
|
||||||
|
|
||||||
$msg = new Message();
|
$msg = new Message();
|
||||||
|
|
||||||
$msg->from_profile = $from;
|
$msg->from_profile = $from;
|
||||||
|
Loading…
Reference in New Issue
Block a user