From b0124c8bb20b91a3fbb125d46bb9c46910d5b79e Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 8 Feb 2024 14:31:53 +0700 Subject: [PATCH] Some code cleanup... (#1386) --- src/Legacy/Common/User.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Legacy/Common/User.php b/src/Legacy/Common/User.php index 21c32cd6b..512d4e455 100644 --- a/src/Legacy/Common/User.php +++ b/src/Legacy/Common/User.php @@ -788,13 +788,6 @@ class User } return true; - } else { - if (md5(md5($enteredPassword)) === $userdata['user_password']) { - // Update old md5 password - DB()->query("UPDATE " . BB_USERS . " SET user_password = '" . $this->password_hash($enteredPassword) . "' WHERE user_id = '" . $userdata['user_id'] . "' AND user_password = '" . $userdata['user_password'] . "' LIMIT 1"); - - return true; - } } return false; @@ -804,9 +797,9 @@ class User * Create password_hash * * @param string $enteredPassword - * @return false|string|null + * @return string */ - public function password_hash(string $enteredPassword) + public function password_hash(string $enteredPassword): string { global $bb_cfg;