From 96df5db3a41b1b7a1b54ce9d9f6a1bab6ca4bc01 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 16 Jun 2024 17:51:11 -0400 Subject: [PATCH] passwoed check --- app/Controllers/Employers.php | 17 +++++++++++------ app/Controllers/Employment.php | 7 +++++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/Controllers/Employers.php b/app/Controllers/Employers.php index 01c22c2..5624da6 100644 --- a/app/Controllers/Employers.php +++ b/app/Controllers/Employers.php @@ -37,10 +37,11 @@ class Employers extends BaseController $query = $this->db->query($findEmp); $row = $query->getResult('array'); $employer_uid = $row[0]['employer_uid']; + $application_uid = $row[0]['application_uid']; + + if ($row[0]['uid']!='' && $application_uid !='' ){ - - if ($row[0]['uid']!='' ){ log_message('error', "Call API---=>"); $api_data = $row[0]; $api_data["signatory_password"] = $this->randomPassword(); // "1000011"; @@ -50,16 +51,20 @@ class Employers extends BaseController $api_data["processing_bank_name"] = "Processing Bank"; $api_data["processing_bank_email"] = "processingbank@email.com"; + $udata = [ + 'employer_uid' => $employer_uid, + 'password' => md5($api_data["signatory_password"]), + 'username' => $api_data["signatory_email"] + ]; + $addedData = $this->insert_db('employer_checks',$udata); + $checkData = $this->APIcall("POST", "http://10.10.10.48:6332/api/verify/employer", json_encode($api_data)); }else{ log_message('error', "Not found API---=>"); } - $udata = [ - 'employer_uid' => $employer_uid - ]; - $addedData = $this->insert_db('employer_checks',$udata); + //$addedData =[]; if( $addedData["uid"] ==''){ diff --git a/app/Controllers/Employment.php b/app/Controllers/Employment.php index de80352..4b46777 100644 --- a/app/Controllers/Employment.php +++ b/app/Controllers/Employment.php @@ -8,12 +8,15 @@ class Employment extends BaseController { public function login() :ResponseInterface { + $data = $this->request->getPost(); + $row =[]; + $data = [ 'call_return' => '100', 'verify_uid'=>'ce00b4c9-7a46-4176-aa5a-0f6d83740dbc', 'dev_status'=>'FAKE_RESULT_NOT_IMPLIMENTED_FOR_REAL', - 'records' => $row + 'records' => $data ]; return $this->respond($data, 200); } @@ -37,5 +40,5 @@ class Employment extends BaseController ]; return $this->respond($data, 200); } - + } \ No newline at end of file