ldaprecord Ldap access a la CActiveRecord

  1. Features
  2. Requirements
  3. Installation
  4. Next steps
  5. Usage

Current version 0.4

Features

  • Usage similar to CActiveRecord
    • similar call syntax (see Usage)
    • use of ActiveForms
    • define relations analogous to CActiveRecord
  • Read / Modify / Save a Node
  • Read a subtree

Requirements

Yii 1.1 or above

Installation

  1. Unzip ldaprecord.zip and move the ldaprecord folder to your /protected/extensions folder
  2. Add the following code to your /protected/config/main.php
...
	'import'=>array(
		...
		'ext.ldaprecord.*',
		...
	),
	...
	'components'=>array(
		...
		'ldap'=>array(
			'class' => 'ext.ldaprecord.LdapComponent',
			'server' => 'ldap://127.0.0.1/',
			'port' => 389,
			'bind_rdn' => 'cn=Manager,dc=domain,dc=com',
			'bind_pwd' => '<pwd>',
			'base_dn' => 'dc=domain,dc=com',
		...
	),

Next steps

  • implement a DataProvider and a Sort class (can be used with 'zii.widgets.CListView')
  • implement a caching mechanism for objectclasses and attributetypes
  • read attribute limitations from Ldap server

Usage

Read a Ldap node by DN

$node = CLdapRecord::model('<yourclassname>')->findByDn('<theDN>');

Read a Ldap subtree

$nodes = CLdapRecord::model('LdapSubTree')->findSubTree(<attributes>);

Howto set relations
Edit method relations() in your class inherited from CLdapRecord (howto see Comment CLdapRecord->relations()).

4 2
6 followers
2 418 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Developed by: Flinx
Created on: Jan 5, 2011
Last updated: 7 years ago

Downloads

show all

Related Extensions