diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-05-29 09:29:29 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-18 22:11:54 +0200 |
commit | 4c0d7104792cb89b8bc013c08b9c9fcb63dcf0da (patch) | |
tree | 2f23ee511ab06b17128ab123765bac93c9b82ef1 /settings | |
parent | 1f17010e0b4099b41cc72f53e18f4d162ce2e3da (diff) | |
download | nextcloud-server-4c0d7104792cb89b8bc013c08b9c9fcb63dcf0da.tar.gz nextcloud-server-4c0d7104792cb89b8bc013c08b9c9fcb63dcf0da.zip |
Just pass uid to the Token stuff
We don't have user objects in the code everywhere
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
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 []; } |