In my core.php config I've set the session like this
Configure::write('Session', array(
'defaults' => 'php',
'cookie' => 'mawar',
'timeout' => 1,
'autoRegenerate' => true
));
and It's working as well, but The problem is when the session expired user need to re-login, and before session time out there is request in ajax, because user is not in login condition so ajax not working and show error 403 - Forbidden
My question is how to give the better solution for user so user be able to continue input form data which already input
whether give a simple modal form login while session expired? or you have more better solution for this case
now I've already tried to read when condition session has expired in app controller with this code
if($this->Auth->user('id')) {// if the user has been logged out because the session has time out
if ($this->request->isAjax()){ // and if the request ajax
// here I want to open modal / simple form login
}
}
And I'm stuck, I'm so glad for your responses
thanks in advance