That worked thanks !!

Just one more small point, I need to create a web form that will allow
certain users based on their permissions to update/modify the user
information stored in the AD.

In the ldap attributes of the modify what is the LDAP equivalent of the
SQL Where clause ?

I.E. If I wanted to update a users details how would the AD know which
user record I would be referring to ?  The sAMAccountName would be the
unique field equivalent to a primary key in a database table


<cfldap username="#ldap_user#" 
                password="#ldap_password#" 
                action="modify" 
                server="#ldap_server"
                modifyType="replace"
                delimiter=";" 
        
dn="CN=AD-SOME-GROUP;OU=Groups;OU=SOME;dc=ads;dc=somedomain;dc=com"
                attributes= "sAMAccountName=form.sAMAccountName,
sn=form.sn,givenName=form.givenName">



-----Original Message-----
From: Dawson, Michael [mailto:[EMAIL PROTECTED] 
Sent: 02 February 2006 16:35
To: CF-Talk
Subject: RE: Coldfusion and Active Directory

I was thinking something like:

<cfset filter = "(&(objectClass=user)">

<cfif len(trim(form.email))>
  <cfset filter = filter & "(mail=#form.email#)"> </cfif>

<cfif len(trim(form.lastName))>
  <cfset filter = filter & "(sn=#form.lastName#)"> </cfif>

<cfset filter = filter & ")"> 

Then, <cfldap ... filter="#filter#" ...>

M!ke

-----Original Message-----
From: Ian Vaughan [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 02, 2006 9:20 AM
To: CF-Talk
Subject: RE: Coldfusion and Active Directory

That's correct, even though the fields are optional, when some of the
fields are populated fields all are required.

Could you explain what you mean by

"you would need some logic to decide how to build the actual filter."

Do you mean setting variables called filter below

<cfset filter = "(&(objectClass=user)">
<cfset filter = filter & "(mail=#form.mail#)"> <cfset filter = filter &
"(sn=#form.sn#)"> Etc......


Then in the ldap query in the filter field just have

<cfldap action="query"
.................
filter="#filter#"  
.................
................
>

????

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231242
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to