From b363a684f295f62a1dcd3bb9a77c04db7a9506a2 Mon Sep 17 00:00:00 2001 From: dignajar Date: Mon, 13 Jul 2020 11:53:48 +0200 Subject: [PATCH] Store usernames in lowercases. #1225 --- bl-kernel/users.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bl-kernel/users.class.php b/bl-kernel/users.class.php index ede3eb1d..4813c6cf 100644 --- a/bl-kernel/users.class.php +++ b/bl-kernel/users.class.php @@ -39,6 +39,7 @@ class Users extends dbJSON { // Return an array with the database of the user, FALSE otherwise public function getUserDB($username) { + $username = Text::lowercase($username); if ($this->exists($username)) { return $this->db[$username]; } @@ -48,12 +49,14 @@ class Users extends dbJSON { // Return TRUE if the user exists, FALSE otherwise public function exists($username) { + $username = Text::lowercase($username); return isset($this->db[$username]); } // Disable the user public function disableUser($username) { + $username = Text::lowercase($username); $this->db[$username]['password'] = '!'; return $this->save(); }