Your ajax response should send a flag or some value if the session is
expired.
When you receive the Ajax response and finds that value use, javascript to
redirect the page.

//Javascript
window.location()
Google the exact syntax, i am just guiding you.



On Fri, Sep 6, 2013 at 1:51 AM, Advantage+ <movepix...@gmail.com> wrote:

> I have / working on a site where 90% of the admin area is handled via ajax
> / json.****
>
> ** **
>
> So I am at the point where I login, destroy the session (on purpose) and
> try to perform an action, which obviously fails but how can I trigger it to
> force the user back to login page, your session has expired please login to
> continue message type setup?****
>
> ** **
>
> I know about 'ajaxLogin' => '/Elements/users/ajax_login', which is what I
> used before altering all calls to be JSON so no HTML is now getting spit
> back to the view. ****
>
> Just wondering what the easiest, site wide approach would be to direct a
> user to the login page if their session has expired when attempting an ajax
> request.****
>
> ** **
>
> Any and all ideas welcome,****
>
> ** **
>
> Thanks****
>
> ** **
>
> Dave****
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to