From 836ffaf0ddbc9dae1b9ec6698b7ba58d7532810c Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Fri, 28 Apr 2023 08:52:09 -0400 Subject: [PATCH] Fixes #3749. This seems to resolve issues with employee maintenance. After this commit I was able to add/change employees. --- app/Controllers/Employees.php | 4 ++-- app/Views/employees/form.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Controllers/Employees.php b/app/Controllers/Employees.php index ae10f7b6a..999a352f1 100644 --- a/app/Controllers/Employees.php +++ b/app/Controllers/Employees.php @@ -213,9 +213,9 @@ class Employees extends Persons * @param $employee_id * @return void */ - public function check_username($employee_id): void + public function getCheckUsername($employee_id): void { - $exists = $this->employee->username_exists($employee_id, $this->request->getVar('username', FILTER_SANITIZE_FULL_SPECIAL_CHARS)); + $exists = $this->employee->username_exists($employee_id, $this->request->getGet('username')); echo !$exists ? 'true' : 'false'; } } diff --git a/app/Views/employees/form.php b/app/Views/employees/form.php index a082e6181..6baf2a66c 100644 --- a/app/Views/employees/form.php +++ b/app/Views/employees/form.php @@ -226,7 +226,7 @@ $(document).ready(function() required: true, minlength: 5, - remote: '' + remote: '' }, password: {