ILDAPProvider
in
Interface ILDAPProvider
Tags
Table of Contents
Methods
- clearCache() : mixed
- Clear the cache if a cache is used, otherwise do nothing.
- clearGroupCache() : mixed
- Clear the cache if a cache is used, otherwise do nothing.
- DNasBaseParameter() : string
- Convert a stored DN so it can be used as base parameter for LDAP queries.
- dnExists() : bool
- Check whether a LDAP DN exists
- getGroupDN() : string
- Translate a group id to LDAP DN.
- getGroupLDAPConnection() : Connection|resource
- Return a new LDAP connection resource for the specified group.
- getLDAPBaseGroups() : string
- Get the LDAP base for groups.
- getLDAPBaseUsers() : string
- Get the LDAP base for users.
- getLDAPConnection() : Connection|resource
- Return a new LDAP connection resource for the specified user.
- getLDAPDisplayNameField() : string
- Get the LDAP attribute name for the user's display name
- getLDAPEmailField() : string
- Get the LDAP attribute name for the email
- getLDAPGroupMemberAssoc() : string
- Get the LDAP attribute name for the type of association between users and groups
- getMultiValueUserAttribute() : array<string|int, mixed>
- Get a multi-value LDAP attribute for a nextcloud user
- getUserAttribute() : string|null
- Get an LDAP attribute for a nextcloud user
- getUserDN() : string
- Translate a user id to LDAP DN.
- getUserName() : string
- Translate a LDAP DN to an internal user name.
- sanitizeDN() : array<string|int, mixed>|string
- Sanitize a DN received from the LDAP server.
Methods
clearCache()
Clear the cache if a cache is used, otherwise do nothing.
public
clearCache(string $uid) : mixed
Parameters
- $uid : string
-
user id
Tags
clearGroupCache()
Clear the cache if a cache is used, otherwise do nothing.
public
clearGroupCache(string $gid) : mixed
Parameters
- $gid : string
-
group id
Tags
DNasBaseParameter()
Convert a stored DN so it can be used as base parameter for LDAP queries.
public
DNasBaseParameter(string $dn) : string
Parameters
- $dn : string
-
the DN
Tags
Return values
stringdnExists()
Check whether a LDAP DN exists
public
dnExists(string $dn) : bool
Parameters
- $dn : string
-
LDAP DN
Tags
Return values
bool —whether the DN exists
getGroupDN()
Translate a group id to LDAP DN.
public
getGroupDN(string $gid) : string
Parameters
- $gid : string
-
group id
Tags
Return values
stringgetGroupLDAPConnection()
Return a new LDAP connection resource for the specified group.
public
getGroupLDAPConnection(string $gid) : Connection|resource
Parameters
- $gid : string
-
group id
Tags
Return values
Connection|resourcegetLDAPBaseGroups()
Get the LDAP base for groups.
public
getLDAPBaseGroups(string $uid) : string
Parameters
- $uid : string
-
user id
Tags
Return values
string —the base for groups
getLDAPBaseUsers()
Get the LDAP base for users.
public
getLDAPBaseUsers(string $uid) : string
Parameters
- $uid : string
-
user id
Tags
Return values
string —the base for users
getLDAPConnection()
Return a new LDAP connection resource for the specified user.
public
getLDAPConnection(string $uid) : Connection|resource
Parameters
- $uid : string
-
user id
Tags
Return values
Connection|resourcegetLDAPDisplayNameField()
Get the LDAP attribute name for the user's display name
public
getLDAPDisplayNameField(string $uid) : string
Parameters
- $uid : string
-
user id
Tags
Return values
string —the display name field
getLDAPEmailField()
Get the LDAP attribute name for the email
public
getLDAPEmailField(string $uid) : string
Parameters
- $uid : string
-
user id
Tags
Return values
string —the email field
getLDAPGroupMemberAssoc()
Get the LDAP attribute name for the type of association between users and groups
public
getLDAPGroupMemberAssoc(string $gid) : string
Parameters
- $gid : string
-
group id
Tags
Return values
string —the configuration, one of: 'memberUid', 'uniqueMember', 'member', 'gidNumber', ''
getMultiValueUserAttribute()
Get a multi-value LDAP attribute for a nextcloud user
public
getMultiValueUserAttribute(string $uid, string $attribute) : array<string|int, mixed>
Parameters
- $uid : string
- $attribute : string
Tags
Return values
array<string|int, mixed>getUserAttribute()
Get an LDAP attribute for a nextcloud user
public
getUserAttribute(string $uid, string $attribute) : string|null
Parameters
- $uid : string
- $attribute : string
Tags
Return values
string|nullgetUserDN()
Translate a user id to LDAP DN.
public
getUserDN(string $uid) : string
Parameters
- $uid : string
-
user id
Tags
Return values
stringgetUserName()
Translate a LDAP DN to an internal user name.
public
getUserName(string $dn) : string
Parameters
- $dn : string
-
LDAP DN
Tags
Return values
string —with the internal user name
sanitizeDN()
Sanitize a DN received from the LDAP server.
public
sanitizeDN(array<string|int, mixed>|string $dn) : array<string|int, mixed>|string
Parameters
- $dn : array<string|int, mixed>|string
-
the DN in question
Tags
Return values
array<string|int, mixed>|string —the sanitized DN