fix: fix infinite password expiry loop
Signed-off-by: Miguel Nogueira <me@nogueira.codes>
This commit is contained in:
@@ -21,7 +21,8 @@ class PasswordExpirationMiddleware
|
||||
{
|
||||
if (Auth::check()) {
|
||||
$sinceUpdate = Carbon::parse(Auth::user()->password_last_updated)->diffInDays(now());
|
||||
$updateThreshold = Options::getOption('password_expiry');
|
||||
$updateThreshold = (int) Options::getOption('password_expiry');
|
||||
|
||||
|
||||
if ($updateThreshold !== 0 && $sinceUpdate > $updateThreshold) {
|
||||
session()->put('passwordExpired', true);
|
||||
|
Reference in New Issue
Block a user