diff options
Diffstat (limited to 'actions/login.php')
-rw-r--r-- | actions/login.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/actions/login.php b/actions/login.php index 9f9c473b5..d25d59cf7 100644 --- a/actions/login.php +++ b/actions/login.php @@ -44,9 +44,16 @@ class LoginAction extends Action { return; } # success! - common_redirect(common_local_url('all', - array('nickname' => - $nickname))); + $url = common_get_returnto(); + if ($url) { + # We don't have to return to it again + common_set_returnto(NULL); + } else { + $url = common_local_url('all', + array('nickname' => + $nickname)); + } + common_redirect($url); } else { $this->show_form(_t('Incorrect username or password.')); } |