diff options
Diffstat (limited to 'actions/login.php')
-rw-r--r-- | actions/login.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actions/login.php b/actions/login.php index cee29fd09..cd1326813 100644 --- a/actions/login.php +++ b/actions/login.php @@ -79,8 +79,6 @@ class LoginAction extends Action $this->clientError(_('Already logged in.')); } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->checkLogin(); - } else if (isset($args['user_id']) && isset($args['token'])){ - $this->checkLogin($args['user_id'],$args['token']); } else { common_ensure_session(); $this->showForm(); @@ -97,7 +95,7 @@ class LoginAction extends Action * @return void */ - function checkLogin($user_id=null, $token=null) + function checkLogin() { if(isset($token) && isset($user_id)){ //Token based login (from the LoginCommand) @@ -139,6 +137,11 @@ class LoginAction extends Action $user = common_check_user($nickname, $password); } + $nickname = common_canonical_nickname($this->trimmed('nickname')); + $password = $this->arg('password'); + + $user = common_check_user($nickname, $password); + if (!$user) { $this->showForm(_('Incorrect username or password.')); return; |