@@ -31,8 +31,9 @@ class Webservice_model extends CI_Model {
...
@@ -31,8 +31,9 @@ class Webservice_model extends CI_Model {
functionlogin($data){
functionlogin($data){
try{
try{
$sql="SELECT region.id AS city_id, customer.name AS user_name,customer.phone, customer.email,
$sql="SELECT region.id AS city_id, customer.name AS user_name,customer.phone, customer.email,
customer.profile_image AS profile_photo, IF(customer.phone_verified=0,'false', 'true') AS is_phone_verified, IF(customer.city='', 'false', 'true') AS is_location_updated,
customer.profile_image AS profile_photo,customer.profile_image_qr,
users.id AS user_id
IF(customer.phone_verified=0,'false', 'true') AS is_phone_verified,
IF(customer.city='', 'false', 'true') AS is_location_updated,users.id AS user_id
FROM users
FROM users
INNER JOIN customer ON (customer.customer_id=users.id)
INNER JOIN customer ON (customer.customer_id=users.id)
LEFT JOIN region ON (region.id=customer.city)
LEFT JOIN region ON (region.id=customer.city)
...
@@ -64,6 +65,7 @@ class Webservice_model extends CI_Model {
...
@@ -64,6 +65,7 @@ class Webservice_model extends CI_Model {
@@ -179,7 +181,7 @@ class Webservice_model extends CI_Model {
...
@@ -179,7 +181,7 @@ class Webservice_model extends CI_Model {
array($email),$template['registration_sms']);
array($email),$template['registration_sms']);
}
}
$this->sendSMS($data['phone'],$message);
$this->sendSMS($data['phone'],$message);
$this->db->select("customer.name AS user_name,customer.phone,customer.email,customer.profile_image AS profile_photo,users.id AS user_id, IF(customer.phone_verified = 0,'false','true') AS is_phone_verified");
$this->db->select("customer.name AS user_name,customer.phone,customer.email,customer.profile_image AS profile_photo,customer.profile_image_qr,users.id AS user_id, IF(customer.phone_verified = 0,'false','true') AS is_phone_verified");
$userDetails=$this->db->query("SELECT customer.name AS name, customer.profile_image AS profile_photo,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();
$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();