Restored some changes from the last commit. Turns out, the HASHSALT_FILE is still used elsewhere ó_Ò

This commit is contained in:
azett 2020-12-19 19:25:52 +01:00
parent d3fbc9132f
commit 83e1644c0f
3 changed files with 11 additions and 3 deletions

View File

@ -59,6 +59,15 @@ function system_save($file, $array) {
// } else die('Wrong number of parameters!');
}
function system_hashsalt_save($force = false) {
global $fp_config;
if ($force || !file_exists(HASHSALT_FILE))
return system_save(HASHSALT_FILE, array(
'fp_hashsalt' => $fp_config ['general'] ['blogid'] . ABS_PATH . BLOG_BASEURL . mt_rand()
));
return true;
}
define('SYSTEM_VER', '1.2.dev');
function system_ver() {

View File

@ -59,9 +59,6 @@ function user_login($userid, $pwd, $params = null) {
user_add($user);
// ... and update user data from re-read user file
$user = user_get($userid);
// after updating the user, we don't need the password hash file any more
io_delete_file(HASHSALT_FILE);
}
if ($loggedin) {

View File

@ -131,6 +131,8 @@ function validate() {
config_save();
system_hashsalt_save();
user_add($user);
return true;