From af36e580df01326092052f52015c03ad79297605 Mon Sep 17 00:00:00 2001 From: ADmad Date: Tue, 4 Oct 2016 01:48:06 +0530 Subject: [PATCH] Fix CS errors. --- src/Auth/HybridAuthAuthenticate.php | 2 ++ src/Controller/HybridAuthController.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Auth/HybridAuthAuthenticate.php b/src/Auth/HybridAuthAuthenticate.php index 0d937b2..b10d819 100644 --- a/src/Auth/HybridAuthAuthenticate.php +++ b/src/Auth/HybridAuthAuthenticate.php @@ -170,6 +170,7 @@ public function getUser(Request $request) $providers = Hybrid_Auth::getConnectedProviders(); foreach ($providers as $provider) { $adapter = Hybrid_Auth::getAdapter($provider); + return $this->_getUser($adapter); } @@ -216,6 +217,7 @@ public function authenticate(Request $request, Response $response) if ($adapter) { return $this->_getUser($adapter); } + return false; } diff --git a/src/Controller/HybridAuthController.php b/src/Controller/HybridAuthController.php index f9a15e0..43362c1 100644 --- a/src/Controller/HybridAuthController.php +++ b/src/Controller/HybridAuthController.php @@ -49,8 +49,10 @@ public function authenticated() $user = $this->Auth->identify(); if ($user) { $this->Auth->setUser($user); + return $this->redirect($this->Auth->redirectUrl()); } + return $this->redirect($this->Auth->config('loginAction')); } }