summaryrefslogtreecommitdiffstats
path: root/settings/Controller
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-05-29 09:29:29 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-06-18 22:11:54 +0200
commit4c0d7104792cb89b8bc013c08b9c9fcb63dcf0da (patch)
tree2f23ee511ab06b17128ab123765bac93c9b82ef1 /settings/Controller
parent1f17010e0b4099b41cc72f53e18f4d162ce2e3da (diff)
downloadnextcloud-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/Controller')
-rw-r--r--settings/Controller/AuthSettingsController.php13
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 [];
}