From 7a1dfbfb8d5cfd4b6e0ba2a24205441a28a3c13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 16 Aug 2022 15:56:54 +0000 Subject: [PATCH] Fix passwordUpdate time for non-pass users --- app/controllers/api/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index d416f72e0..64e5f8161 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -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,