Password_verify

Please, is there anyway I can change this code :

$get_user = “select * from users where user_email=‘$user_email’ AND password=SHA2(‘$user_pass’, 512)”;

to :

$get_user = “select * from users where user_email=‘$user_email’ AND password_verify(‘$user_pass’, row[‘password’])”;

No. You must fetch the hashed column value from the query, which must have been generated by a php password_hash() call, and supply it as the parameter to the php password_verify() function.

1 Like

Thanks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.