Some code cleanup... (#1386)

This commit is contained in:
Roman Kelesidis 2024-02-08 14:31:53 +07:00 committed by GitHub
commit b0124c8bb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -788,13 +788,6 @@ class User
} }
return true; 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; return false;
@ -804,9 +797,9 @@ class User
* Create password_hash * Create password_hash
* *
* @param string $enteredPassword * @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; global $bb_cfg;