mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Some code cleanup... (#1386)
This commit is contained in:
parent
80fe5a5e60
commit
b0124c8bb2
1 changed files with 2 additions and 9 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue