summaryrefslogtreecommitdiff
path: root/app/Controller/Oauth.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-10-17 10:09:03 -0400
committerFrederic Guillot <fred@kanboard.net>2015-10-17 10:09:03 -0400
commit8c532efd5f02f7a7e5ea322a07ddcf49d130a8ec (patch)
tree289222e21420b8d0092f06de097090f179202f6b /app/Controller/Oauth.php
parentb40190ee9fd557d86e594208ed77fa762c7dcfb7 (diff)
Run php-cs-fixer on the code base
Diffstat (limited to 'app/Controller/Oauth.php')
-rw-r--r--app/Controller/Oauth.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/app/Controller/Oauth.php b/app/Controller/Oauth.php
index d9fb513b..8c701cf7 100644
--- a/app/Controller/Oauth.php
+++ b/app/Controller/Oauth.php
@@ -52,8 +52,7 @@ class Oauth extends Base
if ($this->authentication->backend($backend)->unlink($this->userSession->getId())) {
$this->session->flash(t('Your external account is not linked anymore to your profile.'));
- }
- else {
+ } else {
$this->session->flashError(t('Unable to unlink your external account.'));
}
@@ -71,8 +70,7 @@ class Oauth extends Base
if (! empty($code)) {
$this->step2($backend, $code);
- }
- else {
+ } else {
$this->response->redirect($this->authentication->backend($backend)->getService()->getAuthorizationUrl());
}
}
@@ -102,8 +100,7 @@ class Oauth extends Base
{
if (empty($profile)) {
$this->session->flashError(t('External authentication failed'));
- }
- else {
+ } else {
$this->session->flash(t('Your external account is linked to your profile successfully.'));
$this->authentication->backend($backend)->updateUser($this->userSession->getId(), $profile);
}
@@ -120,8 +117,7 @@ class Oauth extends Base
{
if (! empty($profile) && $this->authentication->backend($backend)->authenticate($profile['id'])) {
$this->response->redirect($this->helper->url->to('app', 'index'));
- }
- else {
+ } else {
$this->response->html($this->template->layout('auth/index', array(
'errors' => array('login' => t('External authentication failed')),
'values' => array(),