Fixes #3749. This seems to resolve issues with employee maintenance. After this commit I was able to add/change employees.

This commit is contained in:
Steve Ireland
2023-04-28 08:52:09 -04:00
parent 65c85ab111
commit 836ffaf0dd
2 changed files with 3 additions and 3 deletions

View File

@@ -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';
}
}

View File

@@ -226,7 +226,7 @@ $(document).ready(function()
required: true,
minlength: 5,
remote: '<?php echo esc("$controller_name/check_username/$employee_id") ?>'
remote: '<?php echo esc("$controller_name/checkUsername/$employee_id") ?>'
},
password:
{