PHP Class PMF_Ldap, phpMyFAQ

Since: 2004-12-16
Author: Adam Greene ([email protected])
Author: Thorsten Rinne ([email protected])
Author: Alberto Cabello Sanchez ([email protected])
Author: Lars Scheithauer ([email protected])
Afficher le fichier Open project: thorsten/phpmyfaq Class Usage Examples

Méthodes publiques

Свойство Type Description
$errno integer LDAP error number
$error string Errorlog

Méthodes publiques

Méthode Description
__construct ( PMF_Configuration $config ) : PMF_Ldap Constructor
connect ( string $ldapServer, integer $ldapPort, string $ldapBase, string $ldapUser = '', string $ldapPassword = '' ) : boolean Connects to given LDAP server with given credentials
error ( resource $ds = null ) : string Returns the LDAP error message of the last LDAP command
getCompleteName ( string $username ) : string Returns the user's full name from LDAP
getDn ( string $username ) : string Returns the user's DN
getMail ( string $username ) : string Returns the user's email address from LDAP
quote ( string $string ) : string Quotes LDAP strings in accordance with the RFC 2254

Private Methods

Méthode Description
getLdapData ( string $username, string $data ) : string Returns specific data from LDAP
getLdapDn ( string $username ) : string Returns the DN from LDAP

Method Details

__construct() public méthode

Constructor
public __construct ( PMF_Configuration $config ) : PMF_Ldap
$config PMF_Configuration
Résultat PMF_Ldap

connect() public méthode

Connects to given LDAP server with given credentials
public connect ( string $ldapServer, integer $ldapPort, string $ldapBase, string $ldapUser = '', string $ldapPassword = '' ) : boolean
$ldapServer string
$ldapPort integer
$ldapBase string
$ldapUser string
$ldapPassword string
Résultat boolean

error() public méthode

Returns the LDAP error message of the last LDAP command
public error ( resource $ds = null ) : string
$ds resource LDAP resource
Résultat string

getCompleteName() public méthode

Returns the user's full name from LDAP
public getCompleteName ( string $username ) : string
$username string Username
Résultat string

getDn() public méthode

Returns the user's DN
public getDn ( string $username ) : string
$username string Username
Résultat string

getMail() public méthode

Returns the user's email address from LDAP
public getMail ( string $username ) : string
$username string Username
Résultat string

quote() public méthode

Quotes LDAP strings in accordance with the RFC 2254
public quote ( string $string ) : string
$string string
Résultat string

Property Details

$errno public_oe property

LDAP error number
public int $errno
Résultat integer

$error public_oe property

Errorlog
public string $error
Résultat string