mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fix login redirect ajax request
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -11,6 +11,5 @@ $(() => {
|
||||
})
|
||||
$("#btn-log-out").on("click",() => {
|
||||
clearInterval(chatNotificationInterval)
|
||||
console.log("CLEAR")
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user