I feel your pain, it took me a lot of fiddling to get the parameters just
right so that my cfldap tag got the information I needed.


  <cfif arguments.scope EQ "all">
   <cfset filtersetting =
"(&(objectCategory=CN=Person,CN=Schema,CN=Configuration,DC=smfbc,DC=org)(|(n
ame=#arguments.name#)(displayname=#arguments.name#)(givenName=#arguments.nam
e#)(sn=#arguments.name#)))">
  <cfelse>
   <cfset filtersetting =
"(&(objectCategory=CN=Person,CN=Schema,CN=Configuration,DC=smfbc,DC=org)(nam
e=#arguments.name#))">  
  </cfif>  

  <cfldap
   name="Entity" username="xxxxxx" password="******"
   server="aServer"
   action="" attributes="displayname,mail,sn,cn,givenName,name"
   scope="subtree" start="DC=smfbc,DC=org"
   filter = "#filtersetting#">

The trick, as I remember it, is the grouping of the filter clause with
parentheses.  


HTH, feel free to ask more detailed questions, I'll answer them to the best
of my limited knowledge.

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

-----Original Message-----
From: kamran asli [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 4:30 AM
To: CF-Talk
Subject: Active Directory: Finding user common name using username and
password

Hi all.
I have come to this group after getting disappointed from so many
places. I hope u ppl will be able to solve my problem.
I m trying to use cfladp tag to authenticate user against our domain.
The problem I m having is that we have users divided in different
groups. I m having problem in applying the filter attribute of the
cfldap tag because having the username and password of the user I
can't make his commmon name.
I m using the following code.
<cfldap name   = "authentication"
server     = "myServer"   
action     = "query"
    attributes = "givenname,sn,mail,cn,memberOf"
scope      = "subtree"
start      = "dc=Wizzle,dc=360training,dc=com"
filter     = "(cn=?)" <!--- This is where the
problem is --->
                username   = "mydomain\#loginInfo.username#"
        password   = "#loginInfo.password#"
>
Any help is highly appreciated.
   _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to