Corrected the login HTTP callback

This commit is contained in:
Alex Tselegidis 2021-11-06 16:51:36 +01:00
parent 3422f06cc5
commit a20f2e9e33
2 changed files with 2 additions and 2 deletions

View file

@ -115,7 +115,7 @@ class User extends EA_Controller {
session($user_data); // Save data in the session. session($user_data); // Save data in the session.
json_encode([ json_response([
'success' => TRUE, 'success' => TRUE,
]); ]);
} }

View file

@ -37,7 +37,7 @@ $(function () {
$.post(url, data) $.post(url, data)
.done(function (response) { .done(function (response) {
if (response === GlobalVariables.AJAX_SUCCESS) { if (response.success) {
window.location.href = GlobalVariables.destUrl; window.location.href = GlobalVariables.destUrl;
} else { } else {
$alert.text(EALang['login_failed']); $alert.text(EALang['login_failed']);