From 5197b4341c99355ec712a308a01ad7a84691b22d Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Mon, 10 Nov 2025 18:15:45 +0530 Subject: [PATCH] FIX_ISSUE --- app/Controllers/RestAuthenticationController.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 1465f4b..9d68b2d 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -628,9 +628,9 @@ class RestAuthenticationController extends AdminController if (isset($mobile_number)) { - $hrData = $this->hrModel->where('mobile', $mobile_number)->where('contact_type', 'client')->where('otp', $otp)->first(); + $hrData = $this->hrModel->where('mobile', $mobile_number)->where('contact_type', 'client')->where('is_active', 1)->where('otp', $otp)->first(); }else{ - $hrData = $this->hrModel->where('email', $email)->where('contact_type', 'client')->where('otp', $otp)->first(); + $hrData = $this->hrModel->where('email', $email)->where('contact_type', 'client')->where('is_active', 1)->where('otp', $otp)->first(); } if ($hrData) @@ -658,7 +658,9 @@ class RestAuthenticationController extends AdminController ->join('clients', 'client_branch.client_id = clients.id', 'left') ->where('level_contacts.mobile', $mobile_number ) ->where('level_contacts.contact_type', 'client') - ->where('is_active', 1) + ->where('level_contacts.is_active', 1) + ->where('clients.is_active', 1) + ->where('client_branch.is_active', 1) ->findAll(); //set otp value null $this->hrModel->where('mobile', $mobile_number)->where('otp', $otp)->where('contact_type', 'client')->set(['otp'=>null])->update(); @@ -670,7 +672,9 @@ class RestAuthenticationController extends AdminController ->join('clients', 'client_branch.client_id = clients.id', 'left') ->where('level_contacts.email', $email ) ->where('level_contacts.contact_type', 'client') - ->where('is_active', 1) + ->where('level_contacts.is_active', 1) + ->where('clients.is_active', 1) + ->where('client_branch.is_active', 1) ->findAll(); //set otp value null $this->hrModel->where('email', $email)->where('otp', $otp)->where('contact_type', 'client')->set(['otp'=>null])->update();