refactor: code style changes
Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
@@ -19,20 +19,15 @@ class PasswordExpirationMiddleware
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if(Auth::check())
|
||||
{
|
||||
if (Auth::check()) {
|
||||
$sinceUpdate = Carbon::parse(Auth::user()->password_last_updated)->diffInDays(now());
|
||||
$updateThreshold = Options::getOption('password_expiry');
|
||||
|
||||
if ($updateThreshold !== 0 && $sinceUpdate > $updateThreshold)
|
||||
{
|
||||
if ($updateThreshold !== 0 && $sinceUpdate > $updateThreshold) {
|
||||
session()->put('passwordExpired', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
session()->put('passwordExpired', false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
Reference in New Issue
Block a user