Commit 4c8eb32e by Daniel Ruf

moved $salt to else statement

parent 6f6f3457
......@@ -163,14 +163,13 @@
require_once QA_INCLUDE_DIR.'util/string.php';
if(qa_php_version_below('5.3.7'))$salt=qa_random_alphanum(16);
if(!qa_php_version_below('5.3.7')){
qa_db_query_sub(
'UPDATE ^users SET passhash=$, passsalt=NULL, passcheck=NULL WHERE userid=$',
password_hash($password, PASSWORD_BCRYPT), $userid
);
} else {
$salt=qa_random_alphanum(16);
qa_db_query_sub(
'UPDATE ^users SET passsalt=$, passcheck=UNHEX($) WHERE userid=$',
$salt, qa_db_calc_passcheck($password, $salt), $userid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment