프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_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 |
메소드 | 설명 | |
---|---|---|
__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 |
메소드 | 설명 | |
---|---|---|
_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 | ||
리턴 | void |
protected _filterEscape ( string $string ) : string | ||
$string | string | |
리턴 | 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 | |
리턴 | resource |
protected _openLDAP ( ) |
public isCaseSensitive ( ) : boolean | ||
리턴 | 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 |
리턴 | array | of userinfo (refer getUserData for internal userinfo details) |