Redirect to login when trying to send a direct message while not logged in.

http://status.net/trac/ticket/1359
This commit is contained in:
Craig Andrews 2009-10-30 16:01:20 -04:00
parent 982850c9c7
commit fc22bde67c
1 changed files with 3 additions and 1 deletions

View 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;
}