diff options
| author | Frederic Guillot <fred@kanboard.net> | 2015-10-17 10:09:03 -0400 |
|---|---|---|
| committer | Frederic Guillot <fred@kanboard.net> | 2015-10-17 10:09:03 -0400 |
| commit | 8c532efd5f02f7a7e5ea322a07ddcf49d130a8ec (patch) | |
| tree | 289222e21420b8d0092f06de097090f179202f6b /app/Controller/Twofactor.php | |
| parent | b40190ee9fd557d86e594208ed77fa762c7dcfb7 (diff) | |
Run php-cs-fixer on the code base
Diffstat (limited to 'app/Controller/Twofactor.php')
| -rw-r--r-- | app/Controller/Twofactor.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/Controller/Twofactor.php b/app/Controller/Twofactor.php index 029ee048..179241f8 100644 --- a/app/Controller/Twofactor.php +++ b/app/Controller/Twofactor.php @@ -63,8 +63,7 @@ class Twofactor extends User 'twofactor_activated' => 1, 'twofactor_secret' => GoogleAuthenticator::generateRandom(), )); - } - else { + } else { $this->user->update(array( 'id' => $user['id'], 'twofactor_activated' => 0, @@ -94,8 +93,7 @@ class Twofactor extends User if (! empty($values['code']) && $otp->checkTotp(Base32::decode($user['twofactor_secret']), $values['code'])) { $this->session->flash(t('The two factor authentication code is valid.')); - } - else { + } else { $this->session->flashError(t('The two factor authentication code is not valid.')); } @@ -119,8 +117,7 @@ class Twofactor extends User $this->session['2fa_validated'] = true; $this->session->flash(t('The two factor authentication code is valid.')); $this->response->redirect($this->helper->url->to('app', 'index')); - } - else { + } else { $this->session->flashError(t('The two factor authentication code is not valid.')); $this->response->redirect($this->helper->url->to('twofactor', 'code')); } @@ -148,7 +145,6 @@ class Twofactor extends User $user = $this->getUser(); if ($this->request->getStringParam('disable') === 'yes') { - $this->checkCSRFParam(); $this->user->update(array( |
