Welcome Guest, Not a member yet? Register   Sign In
Codeigniter duplicate session issue
#6

(10-19-2017, 03:18 AM)InsiteFX Wrote: For one I would refactor your code and move a lot of it to a library.

You did not show your logout method, so this would be the way to do it.

PHP Code:
// unset one session item
$this->session->unset_userdata('some_name');

// unset multiple session items
$array_items = array(
 
   'username',
 
   'firstname',
 
   'lastname',
 
   'phone',
 
   'email',
 
   'centre_id',
 
   'zone_id',
 
   'mygroup',
 
   'loggedin'
);

$this->session->unset_userdata($array_items);

// destroy the session should be the last called.
$this->session->sess_destroy(); 

Try that in your logout method and see if it will work.
Still the same problems
Reply


Messages In This Thread
Codeigniter duplicate session issue - by kinje - 10-17-2017, 06:15 AM
RE: Codeigniter duplicate session issue - by kinje - 10-19-2017, 03:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB