Commit 5aefb559 authored by Vipul Basapati's avatar Vipul Basapati Committed by StyleCI Bot

Apply fixes from StyleCI

parent c7921f4a
......@@ -42,14 +42,13 @@ class SessionTimeout
{
//Cookie Name for when 'remember me' is checked
$remember_cookie = \Auth::guard()->getRecallerName();
if(!Cookie::has($remember_cookie) && config('session.timeout_status')) {
if (!Cookie::has($remember_cookie) && config('session.timeout_status')) {
$isLoggedIn = $request->path() != '/logout';
if (!session('lastActivityTime')) {
$this->session->put('lastActivityTime', time());
}
else if (time() - $this->session->get('lastActivityTime') > $this->timeout) {
} elseif (time() - $this->session->get('lastActivityTime') > $this->timeout) {
$this->session->forget('lastActivityTime');
$cookie = cookie('intend', $isLoggedIn ? url()->current() : 'admin/dashboard');
$email = $request->user()->email;
......@@ -58,7 +57,7 @@ class SessionTimeout
return redirect()->route('frontend.auth.login')->withFlashWarning(trans('strings.backend.general.timeout').$this->timeout / 60 .trans('strings.backend.general.minutes'))->withInput(compact('email'))->withCookie($cookie);
}
$isLoggedIn ? $this->session->put('lastActivityTime', time()) : $this->session->forget('lastActivityTime');
$isLoggedIn ? $this->session->put('lastActivityTime', time()) : $this->session->forget('lastActivityTime');
}
return $next($request);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment