Unverified Commit 595f1cbe authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #215 from viralsolani/analysis-z4MYPk

Apply fixes from StyleCI
parents c7921f4a 5aefb559
......@@ -43,13 +43,12 @@ 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;
......
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