• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
store last requested page -> login -> send back to page !- ajax

I am using the Freak Auth lib, and in MY_Controller (every page load) I am setting a session variable to store the last page requested:


Freak Auth's login routine checks for this, and after login, does a nice job of putting you on the page you requested before auth.

I am having a problem though that if a controller is requested via AJAX.. and auth check fails, after login it sends the user to the ajax controller, not the fully rendered page that included the ajax call.

xample page is /foo/bar/1 and the link clicked is an ajax call to /vote/cast, auth check fails.. /vote/cast is being stored as requested page.. so after login, a small view snippet for a vote box is all the you see, as the controller is only meant to be accessed via ajax, not directly.

i am sure the solution is simple, but my head is slow tonight.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.