summaryrefslogtreecommitdiff
path: root/app/Api/Auth.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/Api/Auth.php
parentb40190ee9fd557d86e594208ed77fa762c7dcfb7 (diff)
Run php-cs-fixer on the code base
Diffstat (limited to 'app/Api/Auth.php')
-rw-r--r--app/Api/Auth.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/Api/Auth.php b/app/Api/Auth.php
index b741694b..b3627e4b 100644
--- a/app/Api/Auth.php
+++ b/app/Api/Auth.php
@@ -29,11 +29,9 @@ class Auth extends Base
if ($username !== 'jsonrpc' && ! $this->authentication->hasCaptcha($username) && $this->authentication->authenticate($username, $password)) {
$this->checkProcedurePermission(true, $method);
$this->userSession->refresh($this->user->getByUsername($username));
- }
- else if ($username === 'jsonrpc' && $password === $this->config->get('api_token')) {
+ } elseif ($username === 'jsonrpc' && $password === $this->config->get('api_token')) {
$this->checkProcedurePermission(false, $method);
- }
- else {
+ } else {
throw new AuthenticationFailure('Wrong credentials');
}
}