From 12daf0fa8bea620255d77845ff8f71af9a744131 Mon Sep 17 00:00:00 2001 From: dignajar Date: Mon, 13 Jul 2020 20:36:11 +0200 Subject: [PATCH] rollback users with no-casesensitive --- bl-kernel/functions.php | 2 +- bl-kernel/users.class.php | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index 6f1a58f0..fde68de2 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -392,7 +392,7 @@ function editPage($args) { function deletePage($key) { global $pages; global $syslog; - + if ($pages->delete($key)) { // Call the plugins after page deleted Theme::plugins('afterPageDelete', array($key)); diff --git a/bl-kernel/users.class.php b/bl-kernel/users.class.php index 4813c6cf..1d9bd111 100644 --- a/bl-kernel/users.class.php +++ b/bl-kernel/users.class.php @@ -39,7 +39,6 @@ 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]; } @@ -49,14 +48,12 @@ 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(); } @@ -66,7 +63,6 @@ class Users extends dbJSON { { // The username is store as key and not as field $username = $args['username']; - $username = Text::lowercase($username); // The password is hashed, the password doesn't need to be sanitize in the next step $password = $args['password']; @@ -102,7 +98,6 @@ class Users extends dbJSON { { // The username is store as key and not as field $username = $args['username']; - $username = Text::lowercase($username); // Current database of the user $row = $this->db[$username]; @@ -138,7 +133,6 @@ class Users extends dbJSON { // Delete an user public function delete($username) { - $username = Text::lowercase($username); unset($this->db[$username]); return $this->save(); } @@ -165,7 +159,7 @@ class Users extends dbJSON { public function setRememberToken($username, $token) { - $args['username'] = Text::lowercase($username); + $args['username'] = $username; $args['tokenRemember'] = $token; return $this->set($args); }