mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-26 09:53:34 +03:00
Added check for user ID before posting to the server.
This commit is contained in:
parent
d40c336c3b
commit
5a34d7ec3f
1 changed files with 7 additions and 1 deletions
|
@ -180,11 +180,17 @@ var BackendUsers = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var userId = $input.parents().eq(2).find('.record-id').val();
|
||||||
|
|
||||||
|
if (userId == undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_validate_username';
|
var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_validate_username';
|
||||||
var postData = {
|
var postData = {
|
||||||
'csrfToken': GlobalVariables.csrfToken,
|
'csrfToken': GlobalVariables.csrfToken,
|
||||||
'username': $input.val(),
|
'username': $input.val(),
|
||||||
'user_id': $input.parents().eq(2).find('.record-id').val()
|
'user_id': userId
|
||||||
};
|
};
|
||||||
|
|
||||||
$.post(postUrl, postData, function(response) {
|
$.post(postUrl, postData, function(response) {
|
||||||
|
|
Loading…
Reference in a new issue