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 ¶
- Unzip ldaprecord.zip and move the ldaprecord folder to your /protected/extensions folder
- 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()).
Not Error Free
This extension is not error free for error_reporting = E_ALL configuration in php.ini.
I must change to error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED for running well.
I hope you will fix it.
LDAP Config in yii web application for user aithentication
Hi
I am new to yii i am using the above extension for ldap config for user authentication
please can u say the use of the following code and where i have to add this in the web application
$node = CLdapRecord::model('')->findByDn('');
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.