Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function searchByPhone($phone) {
- if( isset($phone) ){
- $this->db->where('phone', $phone);
- $this->db->from( T_USER_PHONES );
- $result = array_to_assoc( $this->db->get()->result_array(), 'phone');
- $user = array();
- if(isset($result[$phone]['user_id'])){
- $user = $this->getUserById($result[$phone]['user_id']);
- }
- return $user;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement