From db719a37df11488b4032dd916cedfcf35a71a975 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Thu, 20 Mar 2025 15:00:00 +0530 Subject: [PATCH] GWM : Email login issue --- app/Controllers/RestAuthenticationController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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'],