From 087d1cf31eed0d1973cd3460cd65c43fdfd8ef09 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sat, 23 Mar 2024 15:45:50 +0100 Subject: [PATCH] Show password reset count and fix query --- includes/view/User_view.php | 8 ++++---- resources/lang/de_DE/default.po | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/view/User_view.php b/includes/view/User_view.php index db9395b6..ab666189 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -803,8 +803,8 @@ function User_view_state_admin($freeloader, $user_source) $goodie = GoodieType::from(config('goodie_type')); $goodie_enabled = $goodie !== GoodieType::None; $goodie_tshirt = $goodie === GoodieType::Tshirt; - $password_resets = PasswordReset::whereUserId($user_source->id) - ->where('created_at', '>', $user_source->last_login_at) + $password_reset = PasswordReset::whereUserId($user_source->id) + ->where('created_at', '>', $user_source->last_login_at ?: '') ->count(); if ($freeloader) { @@ -856,8 +856,8 @@ function User_view_state_admin($freeloader, $user_source) } } - if ($password_resets > 0) { - $state[] = __('Password reset'); + if ($password_reset) { + $state[] = __('Password reset in progress'); } return $state; diff --git a/resources/lang/de_DE/default.po b/resources/lang/de_DE/default.po index d05249a7..9ed690fa 100644 --- a/resources/lang/de_DE/default.po +++ b/resources/lang/de_DE/default.po @@ -2128,8 +2128,8 @@ msgid "shift.sign_out.hint" msgstr "Du kannst dich bis %s Stunden vor dem Start der Schicht austragen. " "Wenn du nicht zu deiner Schicht kommen kannst, lass dich vom Himmel austragen." -msgid "Password reset" -msgstr "Passwort zurücksetzen" +msgid "Password reset in progress" +msgstr "Passwort zurücksetzen aktiv" msgid "freeload.info.goodie" msgstr "Du warst bei dieser Schicht nicht anwesend. "