ILDAPProvider¶
-
interface
OCP\LDAP\
ILDAPProvider
¶ - Interface ILDAPProvider
Source: lib/public/LDAP/ILDAPProvider.php#36
Methods¶
-
public
OCP\LDAP\ILDAPProvider::
getUserDN
($uid)¶ - Translate a user id to LDAP DN.
Source: Parameters: - $uid (string) user id
Returns: string
Since: 11.0.0
-
public
OCP\LDAP\ILDAPProvider::
getGroupDN
($gid)¶ - Translate a group id to LDAP DN.
Source: Parameters: - $gid (string) group id
Returns: string
Since: 13.0.0
-
public
OCP\LDAP\ILDAPProvider::
getUserName
($dn)¶ - Translate a LDAP DN to an internal user name.
Source: Parameters: - $dn (string) LDAP DN
Returns: string with the internal user name
Throws: \Exception
if translation was unsuccessfulSince: 11.0.0
-
public
OCP\LDAP\ILDAPProvider::
DNasBaseParameter
($dn)¶ - Convert a stored DN so it can be used as base parameter for LDAP queries.
Source: Parameters: - $dn (string) the DN
Returns: string
Since: 11.0.0
-
public
OCP\LDAP\ILDAPProvider::
sanitizeDN
($dn)¶ - Sanitize a DN received from the LDAP server.
Source: Parameters: - $dn (array) the DN in question
Returns: array the sanitized DN
Since: 11.0.0
-
public
OCP\LDAP\ILDAPProvider::
getLDAPConnection
($uid)¶ - Return a new LDAP connection resource for the specified user.
Source: Parameters: - $uid (string) user id
Returns: resource of the LDAP connection
Since: 11.0.0
-
public
OCP\LDAP\ILDAPProvider::
getGroupLDAPConnection
($gid)¶ - Return a new LDAP connection resource for the specified group.
Source: Parameters: - $gid (string) group id
Returns: resource of the LDAP connection
Since: 13.0.0
-
public
OCP\LDAP\ILDAPProvider::
getLDAPBaseUsers
($uid)¶ - Get the LDAP base for users.
Source: Parameters: - $uid (string) user id
Returns: string the base for users
Throws: \Exception
if user id was not found in LDAPSince: 11.0.0
-
public
OCP\LDAP\ILDAPProvider::
getLDAPBaseGroups
($uid)¶ - Get the LDAP base for groups.
Source: Parameters: - $uid (string) user id
Returns: string the base for groups
Throws: \Exception
if user id was not found in LDAPSince: 11.0.0
-
public
OCP\LDAP\ILDAPProvider::
dnExists
($dn)¶ - Check whether a LDAP DN exists
Source: Parameters: - $dn (string) LDAP DN
Returns: bool whether the DN exists
Since: 11.0.0
-
public
OCP\LDAP\ILDAPProvider::
clearCache
($uid)¶ - Clear the cache if a cache is used, otherwise do nothing.
Source: Parameters: - $uid (string) user id
Since: 11.0.0
-
public
OCP\LDAP\ILDAPProvider::
clearGroupCache
($gid)¶ - Clear the cache if a cache is used, otherwise do nothing.
Source: Parameters: - $gid (string) group id
Since: 13.0.0
-
public
OCP\LDAP\ILDAPProvider::
getLDAPDisplayNameField
($uid)¶ - Get the LDAP attribute name for the user’s display name
Source: Parameters: - $uid (string) user id
Returns: string the display name field
Throws: \Exception
if user id was not found in LDAPSince: 12.0.0
-
public
OCP\LDAP\ILDAPProvider::
getLDAPEmailField
($uid)¶ - Get the LDAP attribute name for the email
Source: Parameters: - $uid (string) user id
Returns: string the email field
Throws: \Exception
if user id was not found in LDAPSince: 12.0.0
-
public
OCP\LDAP\ILDAPProvider::
getLDAPGroupMemberAssoc
($gid)¶ - Get the LDAP attribute name for the type of association betweeen users and groups
Source: Parameters: - $gid (string) group id
Returns: string the configuration, one of: ‘memberUid’, ‘uniqueMember’, ‘member’, ‘gidNumber’, ‘’
Throws: \Exception
if group id was not found in LDAPSince: 13.0.0
-
public
OCP\LDAP\ILDAPProvider::
getUserAttribute
($uid, $attribute)¶ - Get an LDAP attribute for a nextcloud user
Source: Parameters: - $uid (string) the nextcloud user id to get the attribute for
- $attribute (string) the name of the attribute to read
Returns: string | null
Throws: \Exception
if user id was not found in LDAPSince: 21.0.0