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])
显示文件 Open project: thorsten/phpmyfaq Class Usage Examples

Public Properties

Property Type Description
$errno integer LDAP error number
$error string Errorlog

Public Methods

Method 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

Method 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 method

Constructor
public __construct ( PMF_Configuration $config ) : PMF_Ldap
$config PMF_Configuration
return PMF_Ldap

connect() public method

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
return boolean

error() public method

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

getCompleteName() public method

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

getDn() public method

Returns the user's DN
public getDn ( string $username ) : string
$username string Username
return string

getMail() public method

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

quote() public method

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

Property Details

$errno public_oe property

LDAP error number
public int $errno
return integer

$error public_oe property

Errorlog
public string $error
return string