Class EC_LDAP

Description

LDAP Database access, set on the European Commission's database

  • author: Pascal (Meta) Havelange (havelangep@gmail.com)
  • copyright: © 2008 All rights reserved

Located in /lib/ecldap.inc.php (line 17)

mldap
   |
   --EC_LDAP
Class Constant Summary
 EC_LDAP_BASE_DN = "ou=People,o=cec.eu.int"
 EC_LDAP_SERVER = "ldap.cc.cec.eu.int"
Variable Summary
static mixed $ldap_attributes
Method Summary
EC_LDAP __construct ()
array search (string $filter, [false|array $required_attributes = false])
Variables
static mixed $ldap_attributes = array( "user_id"=>"uid",
"user_group"=>"cudgroup",
"user_class"=>"objectclass",
"title"=>"title", "first_name"=>"givenname", "last_name"=>"sn", "display_name"=>"cn",
"email"=>"mail", "phone"=>"telephonenumber", "country"=>"c",
"organisation"=>"sourceorganisation","directorate_general"=>"dg","directorate"=>"dir","unit"=>"div",
"department"=>"departmentnumber", "manager_id"=>"manager",
"building"=>"building","floor"=>"floor","office"=>"room",
"address"=>"physicaldeliveryofficename",
"dn"=>"dn"
)
(line 35)

List of existing attributes to fetch. The key in the array are used as aliases to the attributes by the EC_User class

Inherited Variables

Inherited from mldap

mldap::$deref
mldap::$hldap
mldap::$max_results
mldap::$max_time
mldap::$port
mldap::$server
Methods
Constructor __construct (line 50)

Construct a mLdap Object, using the EC Settings

  • access: public
EC_LDAP __construct ()

Redefinition of:
mldap::__construct()
Initialize the mldap object
search (line 63)

Quick search in the directory

  • access: public
array search (string $filter, [false|array $required_attributes = false])
  • string $filter: the LDAP filter. ie: (|(uid=MY_USER_ID)(cn=MY_NAME*))
  • false|array $required_attributes: If false, retrieves default attributes, otherwise retrieve only specific attributes (the list should only contain real attributes names, as defined in the array values of $this->ldap_attributes )

Redefinition of:
mldap::search()
Execute a Search operation and return its results in an array

Inherited Methods

Inherited From mldap

mldap::__construct()
mldap::close()
mldap::connect()
mldap::entryToArray()
mldap::errno()
mldap::error()
mldap::hasAttribute()
mldap::hasAttributeI()
mldap::search()
mldap::setHost()
mldap::testAttribute()
mldap::testAttributeI()
Class Constants
EC_LDAP_BASE_DN = "ou=People,o=cec.eu.int" (line 30)

Base DN

EC_LDAP_SERVER = "ldap.cc.cec.eu.int" (line 22)

Server Host

EC_LDAP_SERVER_PORT = 10389 (line 26)

Server Port

Documentation generated on Thu, 10 Dec 2009 15:16:35 +0100 by phpDocumentor 1.4.1