diff options
author | Vinicius Cubas Brand <viniciuscb@gmail.com> | 2019-03-01 17:04:43 -0300 |
---|---|---|
committer | Vinicius Cubas Brand <viniciuscb@gmail.com> | 2019-03-01 17:04:43 -0300 |
commit | 58c92e604761901964a35f33a00acd5339536cbc (patch) | |
tree | 959e5c45412be38488376dbb98fb2ad87c68e138 /apps | |
parent | 34601f86232621916ebb044dc08d706bd997bbd2 (diff) | |
download | nextcloud-server-58c92e604761901964a35f33a00acd5339536cbc.tar.gz nextcloud-server-58c92e604761901964a35f33a00acd5339536cbc.zip |
Get user's circles without touching session
This works with nextcloud/circles#260
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Principal.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index 18c5545d8d7..a0051980fc1 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -438,12 +438,7 @@ class Principal implements BackendInterface { throw new Exception('Principal not found'); } - $userSession = \OC::$server->getUserSession(); - $currentUser = $userSession->getUser(); - - $userSession->setUser($user); - $circles = \OCA\Circles\Api\v1\Circles::joinedCircles(); - $userSession->setUser($currentUser); + $circles = \OCA\Circles\Api\v1\Circles::joinedCircles($name, true); $circles = array_map(function($circle) { /** @var \OCA\Circles\Model\Circle $group */ |