forked from GNUsocial/gnu-social
Normalize nickname case on login; fixes failed logins where people were typing MixedCase nicknames (if browser saved this form, it would never work again until clearing the saved form data; very icky.)
This commit is contained in:
parent
84fa3776e2
commit
a8d0c8d8ef
@ -134,7 +134,7 @@ function common_check_user($nickname, $password)
|
||||
$authenticatedUser = false;
|
||||
|
||||
if (Event::handle('StartCheckPassword', array($nickname, $password, &$authenticatedUser))) {
|
||||
$user = User::staticGet('nickname', $nickname);
|
||||
$user = User::staticGet('nickname', common_canonical_nickname($nickname));
|
||||
if (!empty($user)) {
|
||||
if (!empty($password)) { // never allow login with blank password
|
||||
if (0 == strcmp(common_munge_password($password, $user->id),
|
||||
|
Loading…
Reference in New Issue
Block a user