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