Corrected the login HTTP callback
This commit is contained in:
parent
3422f06cc5
commit
a20f2e9e33
2 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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']);
|
||||||
|
|
Loading…
Reference in a new issue