Warn not-logged-in users when they try to send a message
This commit is contained in:
parent
6055516aaf
commit
12b9d4346f
@ -98,6 +98,11 @@ class NewmessageAction extends Action
|
|||||||
|
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
|
||||||
|
if (!$user) {
|
||||||
|
$this->clientError(_('Only logged-in users can send direct messages.'), 403);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$this->content = $this->trimmed('content');
|
$this->content = $this->trimmed('content');
|
||||||
$this->to = $this->trimmed('to');
|
$this->to = $this->trimmed('to');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user