GWM : Email login issue

This commit is contained in:
Gowtham M 2025-03-20 15:00:00 +05:30
parent e589580b48
commit db719a37df

View File

@ -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'],