FIX_HR_LOGIN
This commit is contained in:
parent
a9dae0ea76
commit
c278c318b7
@ -563,6 +563,7 @@ class RestAuthenticationController extends AdminController
|
|||||||
->first();
|
->first();
|
||||||
|
|
||||||
$otp = random_int(100000, 999999);
|
$otp = random_int(100000, 999999);
|
||||||
|
$data->otp = $otp;
|
||||||
|
|
||||||
if ($HrData) {
|
if ($HrData) {
|
||||||
|
|
||||||
@ -609,11 +610,9 @@ class RestAuthenticationController extends AdminController
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Call the third-party API function
|
// Call the third-party API function
|
||||||
$reqData = $this->request->getJSON();
|
return $this->callThirdPartyAPI($data,'verifyHrWithEmail');
|
||||||
$reqData->otp = $otp;
|
|
||||||
return $this->callThirdPartyAPI($this->request->getJSON(),'verifyHrWithEmail');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
return $this->respond(['status' => 'failed','code' => 500,'data' => $th],500);
|
return $this->respond(['status' => 'failed','code' => 500,'data' => $th],500);
|
||||||
}
|
}
|
||||||
@ -659,6 +658,7 @@ class RestAuthenticationController extends AdminController
|
|||||||
->join('clients', 'client_branch.client_id = clients.id', 'left')
|
->join('clients', 'client_branch.client_id = clients.id', 'left')
|
||||||
->where('level_contacts.mobile', $mobile_number )
|
->where('level_contacts.mobile', $mobile_number )
|
||||||
->where('level_contacts.contact_type', 'client')
|
->where('level_contacts.contact_type', 'client')
|
||||||
|
->where('is_active', 1)
|
||||||
->findAll();
|
->findAll();
|
||||||
//set otp value null
|
//set otp value null
|
||||||
$this->hrModel->where('mobile', $mobile_number)->where('otp', $otp)->where('contact_type', 'client')->set(['otp'=>null])->update();
|
$this->hrModel->where('mobile', $mobile_number)->where('otp', $otp)->where('contact_type', 'client')->set(['otp'=>null])->update();
|
||||||
@ -670,6 +670,7 @@ class RestAuthenticationController extends AdminController
|
|||||||
->join('clients', 'client_branch.client_id = clients.id', 'left')
|
->join('clients', 'client_branch.client_id = clients.id', 'left')
|
||||||
->where('level_contacts.email', $email )
|
->where('level_contacts.email', $email )
|
||||||
->where('level_contacts.contact_type', 'client')
|
->where('level_contacts.contact_type', 'client')
|
||||||
|
->where('is_active', 1)
|
||||||
->findAll();
|
->findAll();
|
||||||
//set otp value null
|
//set otp value null
|
||||||
$this->hrModel->where('email', $email)->where('otp', $otp)->where('contact_type', 'client')->set(['otp'=>null])->update();
|
$this->hrModel->where('email', $email)->where('otp', $otp)->where('contact_type', 'client')->set(['otp'=>null])->update();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user