From: Brion Vibber Date: Thu, 25 Feb 2010 19:53:39 +0000 (-0800) Subject: Normalize nickname case on login; fixes failed logins where people were typing MixedC... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a8d0c8d8efca2f0ecd4203184c44c73ff11309fb;p=quix0rs-gnu-social.git 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.) --- diff --git a/lib/util.php b/lib/util.php index dd8189a582..84928ec484 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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),