diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 6afa1af..7d32c05 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -112,8 +112,9 @@ class RestAuthenticationController extends AdminController public function verifyEmployeeWithEmailId() { try { - $email = $this->request->getJSON()->email; - + $data = $this->request->getJSON(); + + $email = $data->email; $employeeData = $this->employeeModel->select('employees.relationship,EP.employee_id') ->join('employee_polices EP', 'EP.employee_id = employees.id', 'inner') @@ -133,8 +134,11 @@ class RestAuthenticationController extends AdminController $update = $this->employeeModel->where('email_corporate', $email)->where('relationship', 'self') ->where('is_active', 1)->set(array('otp' => $otp )) ->update(); + if($update) { + $data->otp = $otp; + $this->callThirdPartyAPI($data, 'updateEmpOTP'); $common = [ 'client_id' => $employeeData['client_id'],