]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Redirect to login when trying to send a direct message while not logged in.
authorCraig Andrews <candrews@integralblue.com>
Fri, 30 Oct 2009 20:01:20 +0000 (16:01 -0400)
committerCraig Andrews <candrews@integralblue.com>
Fri, 30 Oct 2009 20:01:20 +0000 (16:01 -0400)
http://status.net/trac/ticket/1359

actions/newmessage.php

index a0b17fc18a5ec315eac3c25b13c5c7f1c271dcb7..eac4ab210444404a372530792b2203a81046ea47 100644 (file)
@@ -99,7 +99,9 @@ class NewmessageAction extends Action
         $user = common_current_user();
 
         if (!$user) {
-            $this->clientError(_('Only logged-in users can send direct messages.'), 403);
+            /* Go log in, and then come back. */
+            common_set_returnto($_SERVER['REQUEST_URI']);
+            common_redirect(common_local_url('login'));
             return false;
         }