mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 10:37:30 -07:00
Some code cleanup...
This commit is contained in:
parent
c0117d3616
commit
2dca4c3fb3
1 changed files with 2 additions and 9 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue