CodeIgniter Forums
Log in to multiple sites - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Log in to multiple sites (/showthread.php?tid=63266)



Log in to multiple sites - behnampmdg3 - 10-13-2015

Hi;

I use database for sessions. To log in, I use this:
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->session->set_userdata('logged_data'$newdata); 
And check the logged user id like this:

PHP Code:
$this->session->userdata['logged_data']['member_id'

I was wondering how I can check that for multiple domains. For example if a user logs in to a db, how can I check if they are logged in another site that is connected to the same db.

Thanks