diff --git a/app/Controllers/AgentAuthController.php b/app/Controllers/AgentAuthController.php index 4b63215..620cde2 100644 --- a/app/Controllers/AgentAuthController.php +++ b/app/Controllers/AgentAuthController.php @@ -36,7 +36,7 @@ class AgentAuthController extends ResourceController } else { - $result = ['agent_verification' => false , 'message' => "Verification Failed"]; + $result = ['agent_verification' => false , 'message' => "User not found"]; return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200); } @@ -102,7 +102,7 @@ class AgentAuthController extends ResourceController $agentData = $this->AgentModel->where('mobile', $mobile)->where('is_active', 1)->first(); } else { - $agentData = $this->AgentModel->where('email', $email)->where('is_active', 1)->first(); + $agentData = $this->AgentModel->where('email', $email)->where('email_otp', $otp)->where('is_active', 1)->first(); } @@ -118,7 +118,7 @@ class AgentAuthController extends ResourceController } else { - return $this->respond(['status' => 'failed','code' => 404,'data' => []],200); + return $this->respond(['status' => 'failed','code' => 404,'data' => 'Please try again'],200); } } catch (\Exception $e) { diff --git a/app/Controllers/StaffAuthController.php b/app/Controllers/StaffAuthController.php index c95b2e7..88e450c 100644 --- a/app/Controllers/StaffAuthController.php +++ b/app/Controllers/StaffAuthController.php @@ -36,7 +36,7 @@ class StaffAuthController extends ResourceController } else { - $result = ['Staff_verification' => false , 'message' => "Verification Failed"]; + $result = ['Staff_verification' => false , 'message' => "User not found"]; return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200); } @@ -102,7 +102,7 @@ class StaffAuthController extends ResourceController $StaffData = $this->StaffModel->where('mobile', $mobile)->where('is_active', 1)->first(); } else { - $StaffData = $this->StaffModel->where('email', $email)->where('is_active', 1)->first(); + $StaffData = $this->StaffModel->where('email', $email)->where('email_otp', $otp)->where('is_active', 1)->first(); } @@ -118,7 +118,7 @@ class StaffAuthController extends ResourceController } else { - return $this->respond(['status' => 'failed','code' => 404,'data' => []],200); + return $this->respond(['status' => 'failed','code' => 404,'data' => 'Please try again'],200); } } catch (\Exception $e) {