Password reset in User state
This commit is contained in:
parent
9a07a7afb3
commit
a94aa36fa4
|
@ -7,6 +7,7 @@ use Engelsystem\Models\AngelType;
|
||||||
use Engelsystem\Models\Group;
|
use Engelsystem\Models\Group;
|
||||||
use Engelsystem\Models\Shifts\Shift;
|
use Engelsystem\Models\Shifts\Shift;
|
||||||
use Engelsystem\Models\Shifts\ShiftEntry;
|
use Engelsystem\Models\Shifts\ShiftEntry;
|
||||||
|
use Engelsystem\Models\User\PasswordReset;
|
||||||
use Engelsystem\Models\User\User;
|
use Engelsystem\Models\User\User;
|
||||||
use Engelsystem\Models\Worklog;
|
use Engelsystem\Models\Worklog;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
@ -771,6 +772,9 @@ function User_view_state_admin($freeloader, $user_source)
|
||||||
$goodie = GoodieType::from(config('goodie_type'));
|
$goodie = GoodieType::from(config('goodie_type'));
|
||||||
$goodie_enabled = $goodie !== GoodieType::None;
|
$goodie_enabled = $goodie !== GoodieType::None;
|
||||||
$goodie_tshirt = $goodie === GoodieType::Tshirt;
|
$goodie_tshirt = $goodie === GoodieType::Tshirt;
|
||||||
|
$password_resets = PasswordReset::whereUserId($user_source->id)
|
||||||
|
->where('created_at', '>', $user_source->last_login_at)
|
||||||
|
->count();
|
||||||
|
|
||||||
if ($freeloader) {
|
if ($freeloader) {
|
||||||
$state[] = '<span class="text-danger">' . icon('exclamation-circle') . __('Freeloader') . '</span>';
|
$state[] = '<span class="text-danger">' . icon('exclamation-circle') . __('Freeloader') . '</span>';
|
||||||
|
@ -821,6 +825,10 @@ function User_view_state_admin($freeloader, $user_source)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($password_resets > 0) {
|
||||||
|
$state[] = __('Password reset');
|
||||||
|
}
|
||||||
|
|
||||||
return $state;
|
return $state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2108,3 +2108,6 @@ msgstr "Es wurde noch kein Engeltyp erstellt. Ohne können keine Schichten erste
|
||||||
msgid "shift.sign_out.hint"
|
msgid "shift.sign_out.hint"
|
||||||
msgstr "Du kannst dich bis %s Stunden vor dem Start der Schicht austragen. "
|
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."
|
"Wenn du nicht zu deiner Schicht kommen kannst, lass dich vom Himmel austragen."
|
||||||
|
|
||||||
|
msgid "Password reset"
|
||||||
|
msgstr "Passwort zurücksetzen"
|
||||||
|
|
Loading…
Reference in New Issue