FIX_ISSUE
This commit is contained in:
parent
b59b83ad92
commit
56d3c148c3
@ -658,9 +658,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)
|
||||
@ -688,7 +688,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();
|
||||
@ -700,7 +702,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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user