From 4392468481de0318f7c961473b36939cdf77b325 Mon Sep 17 00:00:00 2001 From: Smart Date: Fri, 25 Oct 2024 11:54:55 +0530 Subject: [PATCH] CHANGE_ getVerifiedUserData API : GWM --- app/Controllers/RestAuthenticationController.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index a33cff95..bed2e473 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -94,9 +94,16 @@ class RestAuthenticationController extends AdminController { try { $mobile_number = $this->request->getJSON()->mobile_number; - $otp_verification = $this->request->getJSON()->otp; + $otp_verification = $this->request->getJSON()->otp_verification; - $employeeData = $this->employeeModel->where('mobile', $mobile_number)->where('relationship', 'self')->first(); + if (isset($this->request->getJSON()->login_by_hr)) + { + $employeeData = $this->employeeModel->where('id', $this->request->getJSON()->employee_id)->where('relationship', 'self')->first(); + }else{ + $employeeData = $this->employeeModel->where('mobile', $mobile_number)->where('relationship', 'self')->first(); + } + + if ($employeeData && $otp_verification == true || $employeeData && isset($this->request->getJSON()->login_by_hr)) { $auth = HttpRequestHelper::getRequestInfo();