]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Warn not-logged-in users when they try to send a message
authorEvan Prodromou <evan@controlyourself.ca>
Mon, 26 Jan 2009 13:29:31 +0000 (14:29 +0100)
committerEvan Prodromou <evan@controlyourself.ca>
Mon, 26 Jan 2009 13:29:31 +0000 (14:29 +0100)
actions/newmessage.php

index 609577db5967e938090acb34b4f869585fa997de..38e70c90d195c6280b599a81ce6af00403c3e43e 100644 (file)
@@ -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');