Switched to session storage
This commit is contained in:
parent
2a47554428
commit
b99a975de1
|
@ -680,7 +680,7 @@ public function SendTestMail(Request $request)
|
||||||
$user->remember_token = null;
|
$user->remember_token = null;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
setcookie("display_auth_nav", "", time() - 3600, "/");
|
$request->session()->forget('display_auth_nav');
|
||||||
|
|
||||||
Auth::loginUsingId($userID);
|
Auth::loginUsingId($userID);
|
||||||
|
|
||||||
|
|
|
@ -35,10 +35,11 @@ class Impersonate
|
||||||
}
|
}
|
||||||
|
|
||||||
Auth::loginUsingId($id);
|
Auth::loginUsingId($id);
|
||||||
setcookie("display_auth_nav", "true", time() + (10 * 365 * 24 * 60 * 60), "/");
|
$request->session()->put('display_auth_nav', true);
|
||||||
|
$request->session()->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_COOKIE['display_auth_nav'])) {
|
if($request->session()->has('display_auth_nav')) {
|
||||||
if (file_exists(base_path(findAvatar($id)))) {
|
if (file_exists(base_path(findAvatar($id)))) {
|
||||||
$img = '<img alt="avatar" class="iimg irounded" src="' . url(findAvatar($id)) . '">';
|
$img = '<img alt="avatar" class="iimg irounded" src="' . url(findAvatar($id)) . '">';
|
||||||
} elseif (file_exists(base_path("assets/linkstack/images/").findFile('avatar'))) {
|
} elseif (file_exists(base_path("assets/linkstack/images/").findFile('avatar'))) {
|
||||||
|
@ -148,8 +149,8 @@ EOD;;
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
} else {
|
} else {
|
||||||
if(isset($_COOKIE['display_auth_nav'])) {
|
if($request->session()->has('display_auth_nav')) {
|
||||||
setcookie("display_auth_nav", "", time() - 3600, "/");
|
$request->session()->forget('display_auth_nav');
|
||||||
Auth::logout();
|
Auth::logout();
|
||||||
}
|
}
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|
Loading…
Reference in New Issue