using php for ldap administration

From: Date: Sun, 26 Nov 2000 03:34:15 +0000
Subject: using php for ldap administration
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27217@lists.php.net to get a copy of this message
hi, i'll be using php to desig a web-based registration. there will be a drop down list on this web-based form to select the user's department. i've thought of 2 ways of dynamically populating the department drop-down list: 1. design the ldap name space to contain department name and limit the ldap query to one level (from root: dc=mycompany, dc=com) to retrieve all the departments: i.e. uid=username, o=departmentname, dc=mycompany, dc=com 2. store the department name in a mysql database and dynamically populate the drop-down list by querying mysql. my worries about method 1 is whether the php API can perform the following tasks: 1. if the department changes name, how can i update the dn of all the users under this department tree? 2. if a user change department, how can i update his dn to uid=username, o=newdept, dc=mycompany, dc=com? 3. how can i delete a department and all the entries under it's tree? 4. is including the o=department in the dn a good design? or should i just use "uid=username, dc=mycompany,dc=com"? 5. what are the pros and cons of using "o" in the dn? using method 2, the name space design is simpler: uid=username, dc=mycompany, dc=com. but i have to keep duplicate/two sets of department records. one in mysql and one in ldap. and they must be synchronise when any department is modified, deleted or added. i really have no idea what might be the complications for each method and which is a better way of designing. ldap will also be used of authentication other than storing the department name. would really apprecaite some insight/advice from the experienced and knowledgeable php/ldap/mysql users in this mail list. thank you so much.

« previous php.general (#27217) next »