diff options
author | Robin Appelman <robin@icewind.nl> | 2017-01-27 12:52:17 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-02-08 15:17:02 +0100 |
commit | fa49c4a13b6c5455b13ad44cfc158b271aa9b616 (patch) | |
tree | 1014b6de1bd3761e2e26467c78c6f5fd4697ea56 /lib/private/User | |
parent | 1a591cea97313b8500154d6c2c9ce3aaf2f38a88 (diff) | |
download | nextcloud-server-fa49c4a13b6c5455b13ad44cfc158b271aa9b616.tar.gz nextcloud-server-fa49c4a13b6c5455b13ad44cfc158b271aa9b616.zip |
Add a single public api for resolving a cloud id to a user and remote and back
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/User.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php index c37bb59028e..961f70f8a8e 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -411,7 +411,8 @@ class User implements IUser { public function getCloudId() { $uid = $this->getUID(); $server = $this->urlGenerator->getAbsoluteURL('/'); - return $uid . '@' . rtrim( $this->removeProtocolFromUrl($server), '/'); + $server = rtrim( $this->removeProtocolFromUrl($server), '/'); + return \OC::$server->getCloudIdManager()->getCloudId($uid, $server)->getId(); } /** |