Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. public function searchByPhone($phone) {
  2. if( isset($phone) ){
  3. $this->db->where('phone', $phone);
  4. $this->db->from( T_USER_PHONES );
  5. $result = array_to_assoc( $this->db->get()->result_array(), 'phone');
  6. $user = array();
  7. if(isset($result[$phone]['user_id'])){
  8. $user = $this->getUserById($result[$phone]['user_id']);
  9. }
  10. return $user;
  11. }
  12. return false;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement