Thursday, August 30, 2012

Cakephp 1.3 - Detect if Ajax if session expired

Hi everyone!

I have the following problem: in my application I have a button that makes an ajax request. If the session expired, the lightbox will load the default login page. I want to detect if the original request came from Ajax but I don't know exactly how to do it, because in app_controller::beforeFilter the request is not Ajax anymore (at least according to $this->RequestHandler->isAjax() ). I have tried to use $this->Auth->ajaxLogin to set a new view for the login if the request comes from an expired session.

Thank you!

Best regards!

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 

No comments: