diff --git a/ci4/app/Config/Auth.php b/ci4/app/Config/Auth.php index a1b84866..4d265628 100644 --- a/ci4/app/Config/Auth.php +++ b/ci4/app/Config/Auth.php @@ -440,8 +440,14 @@ class Auth extends ShieldAuth public function loginRedirect(): string { $session = session(); - $url = $session->getTempdata('beforeLoginUrl') ?? setting('Auth.redirects')['login']; - + $url = setting('Auth.redirects')['login']; + if(isset($_SERVER['HTTP_X_REQUESTED_WITH'])){ + if($_SERVER['HTTP_X_REQUESTED_WITH'] == "httpxmlrequest"){ + $url = setting('Auth.redirects')['login']; + } + }else{ + $url = $session->getTempdata('beforeLoginUrl') ?? setting('Auth.redirects')['login']; + } return $this->getUrl($url); } diff --git a/httpdocs/assets/js/safekat/pages/chatNotification.js b/httpdocs/assets/js/safekat/pages/chatNotification.js index 333dba83..060d824d 100644 --- a/httpdocs/assets/js/safekat/pages/chatNotification.js +++ b/httpdocs/assets/js/safekat/pages/chatNotification.js @@ -11,6 +11,5 @@ $(() => { }) $("#btn-log-out").on("click",() => { clearInterval(chatNotificationInterval) - console.log("CLEAR") }) }) \ No newline at end of file