| Line 155... |
Line 155... |
| 155 |
$result = array('success' => false, 'message' => "Email is missing",'mobileRequired'=>$mobileRequired,'referrerRequired'=>$referrerRequired);
|
155 |
$result = array('success' => false, 'message' => "Email is missing",'mobileRequired'=>$mobileRequired,'referrerRequired'=>$referrerRequired);
|
| 156 |
break;
|
156 |
break;
|
| 157 |
}
|
157 |
}
|
| 158 |
} else {
|
158 |
} else {
|
| 159 |
//If Social Profile exists, do not update referrer and email
|
159 |
//If Social Profile exists, do not update referrer and email
|
| - |
|
160 |
$docsSumbitted=false;
|
| 160 |
$userData = array('id'=>$socialProfile['SocialProfile']['user_id'],'first_name'=>$this->request->data['name'],'gender'=>$this->request->data['gender'],'profile_pic'=> $this->request->data['profile_pic']);
|
161 |
$userData = array('id'=>$socialProfile['SocialProfile']['user_id'],'first_name'=>$this->request->data['name'],'gender'=>$this->request->data['gender'],'profile_pic'=> $this->request->data['profile_pic']);
|
| 161 |
//Check for utm parameters
|
162 |
//Check for utm parameters
|
| 162 |
if(!empty($this->request->data['utm_source'])){
|
163 |
if(!empty($this->request->data['utm_source'])){
|
| 163 |
$userData['utm_source'] = $this->request->data['utm_source'];
|
164 |
$userData['utm_source'] = $this->request->data['utm_source'];
|
| 164 |
}
|
165 |
}
|
| Line 184... |
Line 185... |
| 184 |
$mobileRequired = false;
|
185 |
$mobileRequired = false;
|
| 185 |
}
|
186 |
}
|
| 186 |
//Check if activated feild is set or not.
|
187 |
//Check if activated feild is set or not.
|
| 187 |
if(!empty($mobilenumber['User']['activated'])) {
|
188 |
if(!empty($mobilenumber['User']['activated'])) {
|
| 188 |
$referrerRequired = false;
|
189 |
$referrerRequired = false;
|
| - |
|
190 |
} else {
|
| - |
|
191 |
$res = $this->SocialProfile->query("select * from user_docs where id=$socialProfile['SocialProfile']['user_id']");
|
| - |
|
192 |
$this->log(print_r($res,1),'registration');
|
| 189 |
}
|
193 |
}
|
| 190 |
$data['user_id'] = $socialProfile['SocialProfile']['user_id'];
|
194 |
$data['user_id'] = $socialProfile['SocialProfile']['user_id'];
|
| 191 |
$result = array('success' => true, 'message' => 'Existing Social Profile','id' => $socialProfile['SocialProfile']['user_id'],'mobileRequired'=>$mobileRequired,'referrerRequired'=>$referrerRequired);
|
195 |
$result = array('success' => true, 'message' => 'Existing Social Profile','id' => $socialProfile['SocialProfile']['user_id'],'mobileRequired'=>$mobileRequired,'referrerRequired'=>$referrerRequired);
|
| 192 |
}
|
196 |
}
|
| 193 |
}
|
197 |
}
|