From: Evan Prodromou Date: Mon, 26 Jan 2009 13:29:31 +0000 (+0100) Subject: Warn not-logged-in users when they try to send a message X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=12b9d4346f75027d3a4f804db72222fbe2282e5d;p=quix0rs-gnu-social.git Warn not-logged-in users when they try to send a message --- diff --git a/actions/newmessage.php b/actions/newmessage.php index 609577db59..38e70c90d1 100644 --- a/actions/newmessage.php +++ b/actions/newmessage.php @@ -98,6 +98,11 @@ class NewmessageAction extends Action $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->to = $this->trimmed('to');