From 89dd5d47561e997d05ffcc587091163a64d403a5 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Thu, 20 Mar 2025 15:03:12 +0530 Subject: [PATCH] GWM : Email login issue --- app/Config/Routes.php | 1 + app/Controllers/RestAuthenticationController.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index ee9ad2c0..badc2d7c 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -436,6 +436,7 @@ $routes->post("/employeeRest/getVerifiedUserData", "RestAuthenticationController $routes->post("/employeeRest/verifyMpin", "RestAuthenticationController::verifyMpin"); $routes->post("/employeeRest/checkMpin", "RestAuthenticationController::checkMpin"); $routes->post("/employeeRest/verifyEmployeeEmailId", "RestAuthenticationController::verifyEmployeeWithEmailId"); +$routes->post("/employeeRest/updateEmpOTP", "RestAuthenticationController::updateEmpOTP"); //HR login api's $routes->post("/employeeRest/verifyHrWithMobileNumber", "RestAuthenticationController::verifyHrWithMobileNumber"); diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 616a69cd..3d141b2b 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -164,6 +164,20 @@ class RestAuthenticationController extends AdminController } } + public function updateEmpOTP() + { + + $email = $this->request->getJSON()->email; + $otp = $this->request->getJSON()->otp; + + $this->employeeModel->where('email_corporate', $email)->where('relationship', 'Self') + ->where('is_active', 1)->set(array('otp' => $otp)) + ->update(); + + return true; + + } + public function getVerifiedUserData() {