summaryrefslogtreecommitdiff
path: root/actions/newmessage.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-10-30 16:01:20 -0400
committerCraig Andrews <candrews@integralblue.com>2009-10-30 16:01:20 -0400
commitfc22bde67cd9a92ffb27bd8ce9258035fb25e582 (patch)
tree4776fa69c990d8dacfc5faeee636b52e9d669a53 /actions/newmessage.php
parent982850c9c75eb2eb9821ae1e3ce76594ffdf4b7e (diff)
Redirect to login when trying to send a direct message while not logged in.
http://status.net/trac/ticket/1359
Diffstat (limited to 'actions/newmessage.php')
-rw-r--r--actions/newmessage.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/actions/newmessage.php b/actions/newmessage.php
index a0b17fc18..eac4ab210 100644
--- a/actions/newmessage.php
+++ b/actions/newmessage.php
@@ -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;
}