Метод | Описание | |
---|---|---|
__construct ( Scalr\Net\Ldap\LdapConfig $config, string $username, string $password, $uid = null ) | Constructor | |
__destruct ( ) | Destructor | |
__sleep ( ) | ||
__wakeup ( ) | ||
clearLog ( ) | Clears log | |
escape ( string $string ) : string | Escapes query string | |
getConfig ( ) : Scalr\Net\Ldap\LdapConfig | Gets LdapConfig | |
getEmail ( ) : string | Gets the user email | |
getFullName ( ) : string | Gets the user's full name | |
getGroupsDetails ( array $groups ) : array | Retrieves information (for now only displayname/description) about groups from LDAP | |
getLdapError ( ) : string | Gets last LDAP error | |
getLog ( ) : string | Gets log | |
getUserGroups ( ) : array | Gets the list of the groups in which specified user has memberships. | |
getUsername ( ) : string | Gets username | |
isValidUser ( ) : boolean | Checks is this user can be authenticated to LDAP | |
isValidUsername ( ) : boolean | Checks if the username exists in the LDAP | |
realEscape ( string $string ) : string | Escapes query string including asterisk and parentheses | |
unbind ( ) : boolean | Unbinds LDAP connection |
Метод | Описание | |
---|---|---|
bindRdn ( string $username = null, string $password = null ) : boolean | Binds to the LDAP directory with specified RDN and password. | |
getConnection ( ) : resource | Gets LDAP connection link identifier | |
log ( string $format, mixed $args = null, mixed $_ = null ) | Adds formatted string to log output |
public __construct ( Scalr\Net\Ldap\LdapConfig $config, string $username, string $password, $uid = null ) | ||
$config | Scalr\Net\Ldap\LdapConfig | LDAP config |
$username | string | LDAP rdn to check. It should look like [email protected] |
$password | string | LDAP password for the specified user |
public getConfig ( ) : Scalr\Net\Ldap\LdapConfig | ||
Результат | Scalr\Net\Ldap\LdapConfig | Returns LdapConfig instance |
protected getConnection ( ) : resource | ||
Результат | resource | Returns LDAP connection link edentifier |
public getFullName ( ) : string | ||
Результат | string | Returns user's full name |
public getGroupsDetails ( array $groups ) : array | ||
$groups | array | List of group ids |
Результат | array | Returns array of groups with their description |
public getLdapError ( ) : string | ||
Результат | string |
public getUserGroups ( ) : array | ||
Результат | array | Returns array of the sAMAccount name of the Groups |
public getUsername ( ) : string | ||
Результат | string | Returns username which should look like [email protected] |
public isValidUser ( ) : boolean | ||
Результат | boolean | Returns true on success or false otherwise |
public isValidUsername ( ) : boolean | ||
Результат | boolean | Returns true on success or false if user does not exist |
public static realEscape ( string $string ) : string | ||
$string | string | The query string |
Результат | string |