diff --git a/core/components/login/controllers/web/Login.php b/core/components/login/controllers/web/Login.php index 0df4449b..67aa6762 100644 --- a/core/components/login/controllers/web/Login.php +++ b/core/components/login/controllers/web/Login.php @@ -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); } @@ -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);