Property | Type | Description | |
---|---|---|---|
$_pattern | * @var array $_pattern User filter pattern | ||
$bound | * @var int $bound What type of connection does already exist? | ||
$con | * @var resource $con holds the LDAP connection | ||
$users | * @var array $users User data cache |
Method | Description | |
---|---|---|
__construct ( ) | Constructor | |
checkPass ( string $user, string $pass ) : boolean | Check user+password | |
getUserData ( string $user, boolean $requireGroups = true ) : array | Return user info | |
isCaseSensitive ( ) : boolean | Most values in LDAP are case-insensitive | |
modifyUser ( string $user, array $changes ) : boolean | Definition of the function modifyUser in order to modify the password | |
retrieveUsers ( integer $start, integer $limit, array $filter = [] ) : array | Bulk retrieval of user data |
Method | Description | |
---|---|---|
_constructPattern ( $filter ) : void | Set the filter pattern | |
_debug ( string $message, integer $err, integer $line, string $file ) : void | Wrapper around msg() but outputs only when debug is enabled | |
_filter ( string $user, array $info ) : boolean | return true if $user + $info match $filter criteria, false otherwise | |
_filterEscape ( string $string ) : string | Escape a string to be used in a LDAP filter | |
_getUserData ( string $user, boolean $inbind = false ) : array | ||
_ldapsearch ( resource $link_identifier, string $base_dn, string $filter, string $scope = 'sub', null | array $attributes = null, integer $attrsonly, integer $sizelimit ) : resource | Wraps around ldap_search, ldap_list or ldap_read depending on $scope | |
_makeFilter ( string $filter, array $placeholders ) : string | Make LDAP filter strings. | |
_openLDAP ( ) | Opens a connection to the configured LDAP server and sets the wanted option on the connection |
protected _constructPattern ( $filter ) : void | ||
$filter | ||
return | void |
protected _filterEscape ( string $string ) : string | ||
$string | string | |
return | string |
protected _ldapsearch ( resource $link_identifier, string $base_dn, string $filter, string $scope = 'sub', null | array $attributes = null, integer $attrsonly, integer $sizelimit ) : resource | ||
$link_identifier | resource | |
$base_dn | string | |
$filter | string | |
$scope | string | can be 'base', 'one' or 'sub' |
$attributes | null | array | |
$attrsonly | integer | |
$sizelimit | integer | |
return | resource |
protected _openLDAP ( ) |
public isCaseSensitive ( ) : boolean | ||
return | boolean |
public retrieveUsers ( integer $start, integer $limit, array $filter = [] ) : array | ||
$start | integer | index of first user to be returned |
$limit | integer | max number of users to be returned |
$filter | array | array of field/pattern pairs, null for no filter |
return | array | of userinfo (refer getUserData for internal userinfo details) |
protected $bound |