static boolean
explodeDn
(string $dn, [ &$keys = null], [ &$vals = null], array $keys, array $vals)
-
string
$dn: The DN to parse
-
array
$keys: An optional array to receive DN keys (e.g. CN, OU, DC, ...)
-
array
$vals: An optional array to receive DN values
-
array
&$keys
-
array
&$vals
static string
filterEscape
(string $str)
-
string
$str: The string to escape.
Prepares an ldap data entry array for insert/update operation
static void
prepareLdapEntryArray
( &$entry, array $entry)
-
array
$entry
-
array
&$entry
Add new information to the LDAP repository
Zend_Ldap
bind
([
string $username =
null], [
string $password =
null])
-
string
$username: The username for authenticating the bind
-
string
$password: The password for authenticating the bind
To connect using SSL it seems the client tries to verify the server
certificate by default. One way to disable this behavior is to set 'TLS_REQCERT never' in OpenLDAP's ldap.conf and restarting Apache. Or, if you really care about the server's cert you can put a cert on the web server.
Zend_Ldap
connect
([
string $host =
null], [
int $port =
null], [
boolean $useSsl =
null], [
boolean $useStartTls =
null])
-
string
$host: The hostname of the LDAP server to connect to
-
int
$port: The port number of the LDAP server to connect to
-
boolean
$useSsl: Use SSL
-
boolean
$useStartTls: Use STARTTLS
Copies a LDAP entry from one DN to another DN.
Copies a LDAP entry from one DN to another subtree.
Count items found by given filter.
Count children for a given DN.
Check if a given DN exists.
Gets the base DN under which objects of interest are located
string
getBaseDn
()
Returns the base node as a Zend_Ldap_Node
Get the currently bound user
FALSE if no user is bound to the LDAP resource NULL if there has been an anonymous bind username of the currently bound user
false|null|string
getBoundUser
()
string
getCanonicalAccountName
(string $acctname, [ $form = 0], int $type)
-
string
$acctname: The name to canonicalize
-
int
$type: The desired form of canonicalization
-
$form
Get LDAP entry by DN
array
getEntry
(
string|Zend_Ldap_Dn $dn, [
$attributes =
array()], [
boolean $throwOnNotFound =
false])
-
string|Zend_Ldap_Dn
$dn
-
array
$attributes
-
boolean
$throwOnNotFound
Return the LDAP error message of the last LDAP command
string
getLastError
([ &$errorCode = null], [ &$errorMessages = null], int $errorCode, array $errorMessages)
-
int
$errorCode
-
array
$errorMessages
-
&$errorCode
-
array
&$errorMessages
Return the LDAP error number of the last LDAP command
int
getLastErrorCode
()
Returns the specified DN as a Zend_Ldap_Node
Moves a LDAP entry from one DN to another DN.
This is an alias for rename()
Moves a LDAP entry from one DN to another subtree.
Renames a LDAP entry from one DN to another DN.
This method implicitely moves the entry to another location within the tree.
Save entry to LDAP registry.
Internally decides if entry will be updated to added by calling exists().
A global LDAP search routine for finding information.
Options can be either passed as single parameters according to the method signature or as an array with one or more of the following keys
- filter
- baseDn
- scope
- attributes
- sort
- collectionClass
Search LDAP registry for entries matching filter and optional attributes
Options can be either passed as single parameters according to the method signature or as an array with one or more of the following keys
- filter
- baseDn
- scope
- attributes
- sort
- reverseSort
array
searchEntries
(
string|Zend_Ldap_Filter_Abstract|array $filter, [
string|Zend_Ldap_Dn|null $basedn =
null], [
integer $scope =
self::SEARCH_SCOPE_SUB], [
$attributes =
array()], [
string|null $sort =
null], [
boolean $reverseSort =
false])
Constructor.
void
__construct
([
array|Zend_Config $options =
array()])
-
array|Zend_Config
$options: Options used in connecting, binding, etc.
Destructor.
void
__destruct
()
Sets the options used in connecting, binding, etc.
Valid option keys: host port useSsl username password bindRequiresDn baseDn accountCanonicalForm accountDomainName accountDomainNameShort accountFilterFormat allowEmptyPassword useStartTls optRefferals tryUsernameSplit
-
array|Zend_Config
$options: Options used in connecting, binding, etc.
array
_getAccount
( $acctname, [ $attrs = null])
-
array
$attrs: An array of names of desired attributes
-
$acctname
integer
_getAccountCanonicalForm
()
string
_getAccountDn
(string $acctname)
-
string
$acctname: The name of the account
string
_getAccountDomainName
()
string
_getAccountDomainNameShort
()
string
_getAccountFilter
( $acctname)
string
_getAccountFilterFormat
()
boolean
_getAllowEmptyPassword
()
boolean
_getBindRequiresDn
()
Retrieve the immediate children DNs of the given $parentDn
This method is used in recursive methods like {@see delete()} or {@see copy()}
boolean
_getOptReferrals
()
boolean
_getTryUsernameSplit
()
boolean
_getUseStartTls
()
boolean
_isPossibleAuthority
(string $dname)
-
string
$dname: The domain name to check
void
_splitName
(string $name, &$dname, &$aname, string $dname, string $aname)
-
string
$name: The name to split
-
string
$dname: The resulting domain name (this is an out parameter)
-
string
$aname: The resulting account name (this is an out parameter)
-
&$dname
-
&$aname