]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use return value of common_check_user() in login.php
authorEvan Prodromou <evan@controlyourself.ca>
Fri, 20 Feb 2009 21:58:19 +0000 (16:58 -0500)
committerEvan Prodromou <evan@controlyourself.ca>
Fri, 20 Feb 2009 21:58:19 +0000 (16:58 -0500)
actions/login.php

index 71e4679292c79102dd97f80f6683a655dfef5535..b049791fb1858dac3d79625317efa0ae77bb5bd9 100644 (file)
@@ -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;
         }