FIX_GET_VERIFIED_USER_DATA_OTP_EMPTY_HANDLE
This commit is contained in:
parent
84c5402004
commit
5dec08dba8
@ -398,6 +398,14 @@ class RestAuthenticationController extends AdminController
|
||||
$otp = isset($this->request->getJSON()->otp) ? $this->request->getJSON()->otp : null;
|
||||
$client_id = $this->request->getJSON()->client_id ?? null;
|
||||
|
||||
if(empty($otp)){
|
||||
return $this->respond(['status' => 'failed','code' => 400,'message' => 'OTP is required'], 200);
|
||||
}
|
||||
|
||||
if (empty($mobile_number) && empty($email_id)) {
|
||||
return $this->respond(['status' => 'failed','code' => 400,'message' => 'Mobile number or Email ID is required'], 200);
|
||||
}
|
||||
|
||||
if (isset($mobile_number))
|
||||
{
|
||||
// $employeeData = $this->employeeModel->where('mobile', $mobile_number)->where('relationship', 'self')->where('emp_status !=', 'truncated')->where('is_active', 1)->first();
|
||||
@ -438,7 +446,6 @@ class RestAuthenticationController extends AdminController
|
||||
$employeeData = $builder->orderBy('employees.id', 'desc')->first();
|
||||
}
|
||||
|
||||
|
||||
$lastQuery = $this->employeeModel->db->getLastQuery();
|
||||
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - getVerifiedUserData: Last Executed Query: " . $lastQuery);
|
||||
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - getVerifiedUserData: employeeData: " . json_encode($employeeData ?? []));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user