Mpin api message
This commit is contained in:
parent
1c112b630b
commit
ccdb791733
@ -944,6 +944,12 @@ class RestAuthenticationController extends AdminController
|
||||
$mpin = $this->request->getJSON()->new_mpin;
|
||||
$client_id = $this->request->getJSON()->client_id ?? null;
|
||||
|
||||
if($old_mpin == $mpin)
|
||||
{
|
||||
$result = ['mpin_verification' => false , 'message' => "New MPIN must be different from the old MPIN"];
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200);
|
||||
}
|
||||
|
||||
// if (isset($mobile_number))
|
||||
// {
|
||||
// $employeeData = $this->employeeModel->where('mobile', $mobile_number)->where('mpin', $old_mpin)->where('relationship', 'self')->first();
|
||||
@ -1015,11 +1021,11 @@ class RestAuthenticationController extends AdminController
|
||||
|
||||
|
||||
} else {
|
||||
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - updateMpin: Employee not found in the POST. Wrong MPIN");
|
||||
$this->myLogger->logme("error", "REST-AUTH-CONTROLLER - updateMpin: Employee not found in the POST. Old MPIN is incorrect");
|
||||
log_message('error', ' ');
|
||||
log_message('error', ' ************************************* POST END **************************************** ');
|
||||
log_message('error', ' ');
|
||||
$result = ['mpin_verification' => false , 'message' => "Wrong Mpin"];
|
||||
$result = ['mpin_verification' => false , 'message' => "Old MPIN is incorrect"];
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200);
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user