summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/user_proxy.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-08-19 08:31:27 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-19 08:31:27 +0200
commitd9172a19070051660e5a94d84e54eaad6854acfd (patch)
tree930ad91f0d9decbb86a43dfd8344259f02309b16 /apps/user_ldap/user_proxy.php
parent69e72eeb37b6d0084c137e1cffffe8717c2f1de0 (diff)
parent41ad4f46c8e1a02ef811d5a9205041bb7a619144 (diff)
downloadnextcloud-server-d9172a19070051660e5a94d84e54eaad6854acfd.tar.gz
nextcloud-server-d9172a19070051660e5a94d84e54eaad6854acfd.zip
Merge pull request #14401 from owncloud/ux-s2s-ldap
allow login names to be used for s2s with LDAP users
Diffstat (limited to 'apps/user_ldap/user_proxy.php')
-rw-r--r--apps/user_ldap/user_proxy.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/user_ldap/user_proxy.php b/apps/user_ldap/user_proxy.php
index 683529eb902..1491be3f394 100644
--- a/apps/user_ldap/user_proxy.php
+++ b/apps/user_ldap/user_proxy.php
@@ -161,7 +161,7 @@ class User_Proxy extends lib\Proxy implements \OCP\IUserBackend, \OCP\UserInterf
/**
* check if a user exists on LDAP
- * @param string|OCA\User_LDAP\lib\User\User $user either the ownCloud user
+ * @param string|\OCA\User_LDAP\lib\User\User $user either the ownCloud user
* name or an instance of that user
* @return boolean
*/
@@ -183,6 +183,17 @@ class User_Proxy extends lib\Proxy implements \OCP\IUserBackend, \OCP\UserInterf
}
/**
+ * returns the username for the given login name, if available
+ *
+ * @param string $loginName
+ * @return string|false
+ */
+ public function loginName2UserName($loginName) {
+ $id = 'LOGINNAME,' . $loginName;
+ return $this->handleRequest($id, 'loginName2UserName', array($loginName));
+ }
+
+ /**
* get the user's home directory
* @param string $uid the username
* @return boolean