diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2021-01-22 14:31:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-22 14:31:19 +0100 |
commit | 939433363ebcbad6212e4fe0413183a190a92eb0 (patch) | |
tree | b4cd02e9f37f45a97d2bd7b2416e66357346eb06 /lib | |
parent | b28cea626857a6ffa458558c9e45d451ac6ec9a2 (diff) | |
parent | f15148f695d68b9bdf55af983f09e2067f6bc3db (diff) | |
download | nextcloud-server-939433363ebcbad6212e4fe0413183a190a92eb0.tar.gz nextcloud-server-939433363ebcbad6212e4fe0413183a190a92eb0.zip |
Merge pull request #25128 from nextcloud/ldapprovider-get-property
extend ILDAPProvider to allow reading arbitrairy ldap attributes for users
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/LDAP/ILDAPProvider.php | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/lib/public/LDAP/ILDAPProvider.php b/lib/public/LDAP/ILDAPProvider.php index d33e5858932..0baee4254e0 100644 --- a/lib/public/LDAP/ILDAPProvider.php +++ b/lib/public/LDAP/ILDAPProvider.php @@ -58,7 +58,7 @@ interface ILDAPProvider { * @since 11.0.0 */ public function getUserName($dn); - + /** * Convert a stored DN so it can be used as base parameter for LDAP queries. * @param string $dn the DN @@ -66,7 +66,7 @@ interface ILDAPProvider { * @since 11.0.0 */ public function DNasBaseParameter($dn); - + /** * Sanitize a DN received from the LDAP server. * @param array $dn the DN in question @@ -74,7 +74,7 @@ interface ILDAPProvider { * @since 11.0.0 */ public function sanitizeDN($dn); - + /** * Return a new LDAP connection resource for the specified user. * @param string $uid user id @@ -90,7 +90,7 @@ interface ILDAPProvider { * @since 13.0.0 */ public function getGroupLDAPConnection($gid); - + /** * Get the LDAP base for users. * @param string $uid user id @@ -99,7 +99,7 @@ interface ILDAPProvider { * @since 11.0.0 */ public function getLDAPBaseUsers($uid); - + /** * Get the LDAP base for groups. * @param string $uid user id @@ -108,7 +108,7 @@ interface ILDAPProvider { * @since 11.0.0 */ public function getLDAPBaseGroups($uid); - + /** * Check whether a LDAP DN exists * @param string $dn LDAP DN @@ -116,7 +116,7 @@ interface ILDAPProvider { * @since 11.0.0 */ public function dnExists($dn); - + /** * Clear the cache if a cache is used, otherwise do nothing. * @param string $uid user id @@ -157,4 +157,14 @@ interface ILDAPProvider { * @since 13.0.0 */ public function getLDAPGroupMemberAssoc($gid); + + /** + * Get an LDAP attribute for a nextcloud user + * @param string $uid the nextcloud user id to get the attribute for + * @param string $attribute the name of the attribute to read + * @return string|null + * @throws \Exception if user id was not found in LDAP + * @since 21.0.0 + */ + public function getUserAttribute(string $uid, string $attribute): ?string; } |