mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Implemented password_hash API 🥳 (#768)
* Replaced md5 with password_hash API * Updated * Update User.php * Update User.php * Updated * Update User.php * Updated * Updated
This commit is contained in:
parent
75c0920dce
commit
18d21d6a49
5 changed files with 65 additions and 11 deletions
|
@ -26,7 +26,7 @@ if ($row = DB()->sql_fetchrow($result)) {
|
|||
if ($row['user_active'] && trim($row['user_actkey']) == '') {
|
||||
bb_die($lang['ALREADY_ACTIVATED']);
|
||||
} elseif ((trim($row['user_actkey']) == trim($_GET['act_key'])) && (trim($row['user_actkey']) != '')) {
|
||||
$sql_update_pass = ($row['user_newpasswd'] != '') ? ", user_password = '" . md5(md5($row['user_newpasswd'])) . "', user_newpasswd = ''" : '';
|
||||
$sql_update_pass = ($row['user_newpasswd'] != '') ? ", user_password = '" . $user->password_hash($row['user_newpasswd']) . "', user_newpasswd = ''" : '';
|
||||
|
||||
$sql = "UPDATE " . BB_USERS . "
|
||||
SET user_active = 1, user_actkey = ''" . $sql_update_pass . "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue