diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2018-06-19 10:11:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-19 10:11:09 +0200 |
commit | 7ef722e7a626e07f36b2c2c01d650651b1e4e126 (patch) | |
tree | 6bbff693403e6f394ced4f9eeacb62f6f5c3c86b /settings | |
parent | b8492c694480e210aaf2c794ed18adf5a9a751b2 (diff) | |
parent | 82959ca93e229e1f16e1843cd4a2f7523b8ac0bf (diff) | |
download | nextcloud-server-7ef722e7a626e07f36b2c2c01d650651b1e4e126.tar.gz nextcloud-server-7ef722e7a626e07f36b2c2c01d650651b1e4e126.zip |
Merge pull request #9485 from nextcloud/feature/9441/multiple_token_providers
Add new public key token provider (tokens survive password change)
Diffstat (limited to 'settings')
-rw-r--r-- | settings/Controller/AuthSettingsController.php | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index 6eaa64cfac2..06cabd00b07 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -83,11 +83,7 @@ class AuthSettingsController extends Controller { * @return JSONResponse|array */ public function index() { - $user = $this->userManager->get($this->uid); - if ($user === null) { - return []; - } - $tokens = $this->tokenProvider->getTokenByUser($user); + $tokens = $this->tokenProvider->getTokenByUser($this->uid); try { $sessionId = $this->session->getId(); @@ -182,12 +178,7 @@ class AuthSettingsController extends Controller { * @return array */ public function destroy($id) { - $user = $this->userManager->get($this->uid); - if (is_null($user)) { - return []; - } - - $this->tokenProvider->invalidateTokenById($user, $id); + $this->tokenProvider->invalidateTokenById($this->uid, $id); return []; } |