$userDetails=$this->db->query("SELECT customer.name AS name, customer.profile_image AS profile_photo,customer.profile_image_qr,customer.gender AS gender, customer.email, customer.dob, customer.profile_city AS city_name, users.notification_status, users.email_status FROM customer INNER JOIN users ON users.id = customer.customer_id WHERE customer.customer_id = ".$user_id." AND users.status = 1 ")->row_array();
$sql="SELECT customer.name AS name,customer.profile_image AS profile_photo,
customer.profile_image_qr,customer.gender AS gender,customer.email,
customer.dob,customer.profile_city AS city_name,users.email_status,
users.notification_status,customer.enable_chat AS user_visible
FROM customer
INNER JOIN users ON users.id=customer.customer_id
WHERE customer.customer_id=$user_id AND users.status='1'";