daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Jan 17th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function Facebook() {
  2.     $fb_data = $this->session->userdata('fb_data');
  3.     // This array contains all the user FB information
  4.  
  5.     $data['fb_data'] = $fb_data;
  6.     $fb = $data['fb_data']['me']['id'];
  7.  
  8.     $userdata = $this->user_model->getID($fb);
  9.  
  10.     $userID = $userdata['0']['id'];
  11.     $userNick = $userdata['0']['nick'];
  12.  
  13.     $session_array = array(
  14.         'id' => $userID,
  15.         'userNick' => $userNick
  16.     );
  17.  
  18.     $this->session->set_userdata('user_data',$session_array);
  19.     $user = $this->session->userdata('user_data');
  20.  
  21.     print_r($this->session->all_userdata());
  22.  
  23.     //print_r($user);
  24.  
  25.     if($user['id'] && $user['userNick']) {
  26.         redirect('/');
  27.     }
  28. }
  29.    
  30. $config['sess_cookie_name'] = 'ci_session';
  31. $config['sess_expiration'] = 0;
  32. $config['sess_expire_on_close'] = FALSE;
  33. $config['sess_encrypt_cookie'] = FALSE;
  34. $config['sess_use_database'] = FALSE;
  35. $config['sess_table_name'] = 'ci_sessions';
  36. $config['sess_match_ip'] = FALSE;
  37. $config['sess_match_useragent'] = TRUE;
  38. $config['sess_time_to_update'] = 300;
  39.    
  40. $config['sess_expire_on_close'] = FALSE;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top