Show password reset count and fix query

This commit is contained in:
Igor Scheller 2024-03-23 15:45:50 +01:00 committed by xuwhite
parent f9059161ec
commit 087d1cf31e
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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. "