$config_account_salt -> USE_ACCOUNT_SALT

This commit is contained in:
slawkens
2023-02-07 10:48:29 +01:00
parent d0c479d11d
commit b82c021ff7
13 changed files with 20 additions and 26 deletions

View File

@@ -173,8 +173,7 @@ if($save)
$new_account->create(NULL, $account_id);
}
$config_salt_enabled = $db->hasColumn('accounts', 'salt');
if($config_salt_enabled)
if(USE_ACCOUNT_SALT)
{
$salt = generateRandomString(10, false, true, true);
$password = $salt . $password;
@@ -185,7 +184,7 @@ if($save)
$new_account->unblock();
$new_account->save();
if($config_salt_enabled)
if(USE_ACCOUNT_SALT)
$new_account->setCustomField('salt', $salt);
$new_account->setCustomField('created', time());