use return value of common_check_user() in login.php
This commit is contained in:
parent
d5bf7e5cfb
commit
4aa9b95f51
|
@ -108,13 +108,15 @@ class LoginAction extends Action
|
||||||
$nickname = common_canonical_nickname($this->trimmed('nickname'));
|
$nickname = common_canonical_nickname($this->trimmed('nickname'));
|
||||||
$password = $this->arg('password');
|
$password = $this->arg('password');
|
||||||
|
|
||||||
if (!common_check_user($nickname, $password)) {
|
$user = common_check_user($nickname, $password);
|
||||||
|
|
||||||
|
if (!$user) {
|
||||||
$this->showForm(_('Incorrect username or password.'));
|
$this->showForm(_('Incorrect username or password.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// success!
|
// success!
|
||||||
if (!common_set_user($nickname)) {
|
if (!common_set_user($user)) {
|
||||||
$this->serverError(_('Error setting user.'));
|
$this->serverError(_('Error setting user.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user