Fix "Trying to get property of non-object" errors when a user tries to log in using an unknown nickname
This commit is contained in:
parent
cfea2b0c4e
commit
e2b20bd1e6
|
@ -114,7 +114,7 @@ function common_check_user($nickname, $password)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$user = User::staticGet('nickname', $nickname);
|
$user = User::staticGet('nickname', $nickname);
|
||||||
if (is_null($user)) {
|
if (is_null($user) || $user === false) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (0 == strcmp(common_munge_password($password, $user->id),
|
if (0 == strcmp(common_munge_password($password, $user->id),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user