![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Under Construction! |
||||||||
LDAP Server... The LDAP server is an emerging standard for keeping track of people's data. Many server companies such as Netscape are relying on it to deliver a complete solution. With the LDAP server, you have a sing point of administration for the users in your office or in this case for your users. Therefore adding a user is as easy as adding an entry into the LDAP server and deleting one is just as easy. Here is a typical LDAP query using the CFLDAP tag: <CFLDAP name="customerquery" server="aserver" The above query will return the common name of all the customers in the company/(whatever session.variable is)/ customers directory with the description attribute = active. More information on the CFLDAP tag and how the filters work in the cfdocs. Since the LDAP server allows multiple attributes (for instance, there could be two or more description attributes for one single entry), a problem occurs. What if you had an entry with the multiple description fields, say descritpion=active, description=user and you tried to return the description field? Well, the output looks something like this: active,user. Now if I wanted to use that to populate a select box, I could not use the CFSELECT tag because it is a string. So I came up with the following custom tag called CF_LDAPSELECT, which creates a select box from a query of this kind. Here is the code: <!-- CFLDAPselect.cfm And here is how you use it: <SELECT NAME="Plat"> The LDAP server is a useful tool if you know how to use it, but before you try to use it, be sure you have a through understanding of how it works. You must know the basic structure of how it is set up and understand DN's, queries and server administration. UPDATE... I have had a request to show how to do inserts and modifies with CFLDAP, so here it goes. Without going into the details of how an LDAP server works, basically the two import attributes to have are the dn and the objectclass attributes. Every entry must have a unique dn and the objectclass=top attribute in it. Add example: Using HTML is not a good example, because sometimes you have to watch out for the attributes running on another line. It might be worth putting all the attributes on the same line if you have errors. Any further errors could be because you are not binding correctly as the directory manager. A Modify action is the same as above, except for the variable attributetemp holds the attributes you want to modify. For more information on the LDAP server, check out the following URL: http://developer.netscape.com/tech/directory/index.html You Must know about how the LDAP server works before you even think of trying to program with it. Continue to Next Page Previous Page |
||||||||
![]() |
||||||||
|