Welcome Guest, Not a member yet? Register   Sign In
Problem in login system while using Ajax
#1

[eluser]FutureKing[/eluser]
I am creating a website with user management system. The control panel for users has Ajax interface.
I have created a membership class "mem_mdl"
On every constructor of my controller I use its methods like this:

$this->mem_mdl->is_login();
$this->mem_mdl->load_auth(); // this loads authorization data
$this->mem_mdl->is_auth('wall_man'); //where 'wall_man' is module name // this function checks whether a user is authorized to use 'wall_man' module.

What the above function does:
It checks the login status and authorization of user and if fails then redirects the user to appropriate page(Login page,Unauthorised page or the user requested page).

My system uses ajax interface. Now the problem is if the user has been logged out from some other tabs/window of browser and the Ajax interface is remained open on some other tab/window then...
While processing ajax request instead of redirection. I get something like this:

NORMAL:
http://img384.imageshack.us/i/normalp.jpg/
PROBLEM:
http://img297.imageshack.us/i/problemjs.jpg/

Please see the above screenshots. I hope you understood my problem.
I use codeigniter redirect() for redirection and for ajax I am using jQuery.


Messages In This Thread
Problem in login system while using Ajax - by El Forum - 10-02-2009, 10:14 AM
Problem in login system while using Ajax - by El Forum - 10-02-2009, 04:20 PM
Problem in login system while using Ajax - by El Forum - 10-02-2009, 06:00 PM
Problem in login system while using Ajax - by El Forum - 10-02-2009, 06:47 PM
Problem in login system while using Ajax - by El Forum - 10-02-2009, 07:10 PM
Problem in login system while using Ajax - by El Forum - 10-02-2009, 07:30 PM
Problem in login system while using Ajax - by El Forum - 10-03-2009, 01:25 AM
Problem in login system while using Ajax - by El Forum - 10-03-2009, 04:14 AM
Problem in login system while using Ajax - by El Forum - 10-03-2009, 04:58 AM
Problem in login system while using Ajax - by El Forum - 10-03-2009, 05:39 AM
Problem in login system while using Ajax - by El Forum - 10-03-2009, 05:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB