From 08ad47caf7cdf01b43969956772fcd3db52ec3ef Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 5 Apr 2018 19:06:06 +0200 Subject: [PATCH] app/controllers/AuthController.php: in oauthAction() do not show error message when in fact oauth succeeded. --- app/controllers/AuthController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/AuthController.php b/app/controllers/AuthController.php index e30b36d..bc4edae 100644 --- a/app/controllers/AuthController.php +++ b/app/controllers/AuthController.php @@ -46,10 +46,11 @@ class AuthController extends ControllerBase if (is_array($response)) { $this->auth->loginOauth($response['auth']); + $this->response->redirect('/'); + } else { + $this->flash->message('error', 'Failed to authenticate.'); + $this->response->redirect('/login'); } - - $this->flash->message('error', 'Failed to authenticate.'); - $this->response->redirect('/login'); } public function logoutAction()