Commit 2569b822 by Jansa Jose

Merge branch 'master' into 'local_production'

Master See merge request !211
parents 00a7f211 1d667a53
...@@ -2786,29 +2786,6 @@ ...@@ -2786,29 +2786,6 @@
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
// public function car_model_list(){
// header('Content-type:application/json');
// $headers = apache_request_headers();
// if(!isset($headers['auth']) || empty($headers['auth'])){
// $respArr['status'] = 'error';
// $respArr['message'] = 'Authtoken is Required';
// echo json_encode($respArr);exit;
// }
// $authRes = $this->Webservice_model->get_customer_authtoken($headers['auth']);
// if($authRes['status'] == 'error'){
// echo json_encode($authRes);exit;
// }
// $post = file_get_contents("php://input");
// $postData = json_decode($post,true);
// if(empty($postData)){
// $respArr = array('status'=>0,'error'=>'901','message'=>'All Field is Required');
// echo json_encode($respArr);exit;
// }
// $respArr = $this->Webservice_model->getVehicleModel($postData);
// echo json_encode($respArr);exit;
// }
public function trim_list(){ public function trim_list(){
header('Content-type:application/json'); header('Content-type:application/json');
$headers = apache_request_headers(); $headers = apache_request_headers();
...@@ -2837,7 +2814,7 @@ ...@@ -2837,7 +2814,7 @@
$post = file_get_contents("php://input"); $post = file_get_contents("php://input");
$postData = json_decode($post, true); $postData = json_decode($post, true);
$this->load->model('Customer_model'); $this->load->model('Customer_model');
$respArr = array('status'=>'error','message'=>'Something went wrong.'); $respArr = array('status'=>'0','message'=>'Something went wrong.');
if(empty($postData)){ if(empty($postData)){
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
...@@ -2903,7 +2880,10 @@ ...@@ -2903,7 +2880,10 @@
public function getUserDetails($postData){ public function getUserDetails($postData){
$custResp = $this->Webservice_model->checkSocialCustomerLogin($postData); $custResp = $this->Webservice_model->checkSocialCustomerLogin($postData);
if(empty($custResp) || !isset($custResp['status']) || empty($custResp['status'])){ //pr($custResp);
if(isset($custResp['status']) && $custResp['status'] == '2'){
$respArr['message'] = 'User Not Registered Yet';
$respArr['status'] = '0';
return $respArr ; return $respArr ;
} }
if($custResp['status'] == '1'){ if($custResp['status'] == '1'){
......
...@@ -57,8 +57,7 @@ class Webservice_model extends CI_Model { ...@@ -57,8 +57,7 @@ class Webservice_model extends CI_Model {
return $respArr; return $respArr;
} }
$this->db->select("customer_id as id,is_otp_verified,phone as phone_number,TRIM(CONCAT(first_name,' ' ,IFNULL(last_name,''))) as user_name"); $this->db->select("customer_id as id,is_otp_verified,phone as phone_number,TRIM(CONCAT(first_name,' ' ,IFNULL(last_name,''))) as user_name");
$result = $this->db->get_where('customers',array('email'=>$userLogData['email'], $result = $this->db->get_where('customers',array('email'=>$userLogData['email'],'status'=>'1'));
'status'=>'1'));
$respArr['status'] = 3; $respArr['status'] = 3;
if(!empty($result) && $result->num_rows() == 1 && !empty($custData = $result->row())){ if(!empty($result) && $result->num_rows() == 1 && !empty($custData = $result->row())){
$authdata = $this->insert_auth($custData->id); $authdata = $this->insert_auth($custData->id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment