Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 13th, 2012  |  syntax: None  |  size: 0.77 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if(empty($email) || empty($password))
  2.                 {
  3.                         return FALSE;
  4.                 }
  5.                
  6.                 $password = $this->_mycrypt($password);
  7.        
  8.  
  9.                 if($this->session->userdata('selected_sn')=='4sq'){
  10.                
  11.        
  12.                
  13.                         $query = $this->db->query('
  14.                         SELECT users.id as u_id, geosocial_4sq.4sq_id,
  15.                         geosocial_4sq.firstname AS 4sq_firstname,
  16.                         geosocial_4sq.photo  AS 4sq_photo, ,
  17.                         geosocial_4sq.token,
  18.                         geosocial_4sq.secret
  19.                         FROM users, geosocial_4sq
  20.                         WHERE users.email = ? AND
  21.                         users.password = ? AND geosocial_4sq.fk_user = users.id ', array($email,$password));
  22.  
  23.                
  24.                 if($query && $query->num_rows() == 1)
  25.                 {
  26.                 var_dump($query->row_array());
  27.                         return $query->row_array();
  28.                 }
  29.                 else
  30.                 {
  31.                         return FALSE;
  32.                 }
  33.  
  34.  
  35.                 }else {
  36.                         throw new Exception("Unselected social network");