Issue with Sessions! How to keep the user login forever |
Hi;
I use CI database for sessions (and user's auth). 1 - I was wondering how I can get the users to be logged in forever. 2 - Let's say user logs in and stays idle for 15 min. If I reload a page (with Ajax or Jquery) that requires the user to be logged in, it logs the user out and says the user is not logged in. How can I do it so once the user logs in, I'd be able to make ajax calls at any time without having to re login. This is my config: PHP Code: $config['sess_cookie_name'] = 'ci_session_web'; This is how I log them in: PHP Code: $newdata = array('username' => $data['member_details'][0]->first_name,'email' => $data['member_details'][0]->email, 'member_id' => $data['member_details'][0]->id, 'logged_in' => TRUE); This is how I check if the user is logged in or not. PHP Code: if(isset($this->session->userdata['logged_data']['logged_in'])) Thanks |
Messages In This Thread |
Issue with Sessions! How to keep the user login forever - by behnampmdg3 - 12-13-2015, 10:32 PM
RE: Issue with Sessions! How to keep the user login forever - by lazyfox - 12-14-2015, 12:54 AM
RE: Issue with Sessions! How to keep the user login forever - by behnampmdg3 - 12-15-2015, 10:35 PM
RE: Issue with Sessions! How to keep the user login forever - by behnampmdg3 - 12-15-2015, 11:28 PM
RE: Issue with Sessions! How to keep the user login forever - by cartalot - 12-16-2015, 12:01 PM
RE: Issue with Sessions! How to keep the user login forever - by behnampmdg3 - 12-16-2015, 08:24 PM
RE: Issue with Sessions! How to keep the user login forever - by kilishan - 12-16-2015, 08:32 PM
|