summaryrefslogtreecommitdiff
path: root/actions/login.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/login.php')
-rw-r--r--actions/login.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/actions/login.php b/actions/login.php
index 71e467929..b049791fb 100644
--- a/actions/login.php
+++ b/actions/login.php
@@ -108,13 +108,15 @@ class LoginAction extends Action
$nickname = common_canonical_nickname($this->trimmed('nickname'));
$password = $this->arg('password');
- if (!common_check_user($nickname, $password)) {
+ $user = common_check_user($nickname, $password);
+
+ if (!$user) {
$this->showForm(_('Incorrect username or password.'));
return;
}
// success!
- if (!common_set_user($nickname)) {
+ if (!common_set_user($user)) {
$this->serverError(_('Error setting user.'));
return;
}