1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

Fix passwordUpdate time for non-pass users

This commit is contained in:
Matej Bačo 2022-08-16 15:56:54 +00:00
parent 2814a6f680
commit 7a1dfbfb8d

View file

@ -54,7 +54,7 @@ function createUser(string $hash, mixed $hashOptions, string $userId, ?string $e
'password' => (!empty($password)) ? ($hash === 'plaintext' ? Auth::passwordHash($password, $hash, $hashOptionsObject) : $password) : null,
'hash' => $hash === 'plaintext' ? Auth::DEFAULT_ALGO : $hash,
'hashOptions' => $hash === 'plaintext' ? Auth::DEFAULT_ALGO_OPTIONS : $hashOptions,
'passwordUpdate' => \time(),
'passwordUpdate' => (!empty($password)) ? \time() : 0,
'registration' => \time(),
'reset' => false,
'name' => $name,