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: {