Skip to content

Commit

Permalink
Fixed success variable names.
Browse files Browse the repository at this point in the history
  • Loading branch information
muzzwood committed Jan 9, 2018
1 parent b1e5c51 commit 99dfbf8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/components/login/controllers/web/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,12 @@ public function login() {
} else {
// Return JSON success response if requested.
if ($this->getProperty('jsonResponse')) {
$jsonErrorOutput = array(
$jsonSuccessOutput = array(
'success' => true,
'message' => $this->getProperty('loginMsg')
);
header('Content-Type: application/json;charset=utf-8');
exit($this->modx->toJSON($jsonErrorOutput));
exit($this->modx->toJSON($jsonSuccessOutput));
}
$this->redirectAfterLogin($response);
}
Expand Down Expand Up @@ -439,12 +439,12 @@ public function logout() {
$this->runPostLogoutHooks($response);
// Return JSON logout success
if ($this->getProperty('jsonResponse')) {
$jsonErrorOutput = array(
$jsonSuccessOutput = array(
'success' => true,
'message' => $this->getProperty('logoutMsg')
);
header('Content-Type: application/json;charset=utf-8');
exit($this->modx->toJSON($jsonErrorOutput));
exit($this->modx->toJSON($jsonSuccessOutput));
}
$this->redirectAfterLogout($response);

Expand Down

0 comments on commit 99dfbf8

Please sign in to comment.