Okay, I have my first page with the output of for example:
http://www.bbhtx.org/Information2.asp?logonUser=dallen
or
http://www.bbhtx.org/Information2.asp?logonUser=rcohen
The question that I am having a hard time is using that value in the new
page. For example if I do
Passed Value= <% =logonuser %>
my output is:
Passed Value=
I would have fiqured it would be Passed Value=dallen or Passed Value= rcohen
with the respective code.
What am I doing wrong?
--
Sorry, I am no longer including my e-mail address as I am getting to much
spam. I really have no desire to enlarge "it" by three inches, that is even
if I get e-mailed 10 times a day from different e-mail addresses so I can't
block it.
Besides I finally came to believe what others have said, if you have a
question, you should ask the group as others might benefit from it. Anyone
on the group who I converse with off topic or on the side, can easily find
my e-mail address.
"Ray at <%=sLocation%>" <> wrote in
message news:#cM#...
> If you only have one domain and all your users are in the same OU, you'd
> just have to pass the username, like:
>
> site.com/showuser.asp?user=username
>
> But, if your users are stored in all different container or you have
> different domains, you'd have to have to pass that info, to:
>
>
> site.com/showuser.asp?dc=domain2&dc=com&ou=Accounting&usern ame=jsmith
>
> With that, you could do:
>
> <%
> Dim sOU, sCN, sDC, aOU, aCN, aDC
> Dim sUsername
> sOU = Request.Querystring("ou") : aOU = Split(sOU, ", ")
> sCN = Request.Querystring("cn") : aCN = Split(sCN, ", ") '''no container
in
> this example
> sDC = Request.Querystring("dc") : aDC = Split(sDC, ", ")
> sUsername = Request.Querystring("username")
>
> sLDAP = "LDAP://"
> For iCounter = 0 To UBound(aOU)
> sLDAP = sLDAP & "ou=" & aOU(iCounter) & ","
> Next
>
> For iCounter = 0 To UBound(aCN)
> sLDAP = sLDAP & "cn=" & aCN(iCounter) & ","
> Next
>
>
> For iCounter = 0 To UBound(aDC)
> sLDAP = sLDAP & "dc=" & aDC(iCounter) & ","
> Next
>
> sLdap = Left(sLDAP, Len(sLDAP) - 1)
>
>
>
> Then, do:
>
> Set oContainer = GetObject(sLDAP)
> '''code, code, code
> If oUser.sAMAccountName= sUsername Then...
>
>
> '''I'm sure there's a much more graceful way to build the ldap string out
of
> a querystring than what I demonstrated...
>
> Ray at home
>
>
> "Robert Cohen" <> wrote in message
> news:%...
> > Hi All,
> > I have what is an easy question for you all, but I have not idea
(this
> > is in vbscript). I have this script below that works great. It figures
> out
> > the user logged in and gives the AD information about the user.
> > On another webpage, I have a staff directory which lists all the
> users.
> > What I would like to do is create a link on the staff directory that
will
> > open up this information page with the user specified (instead of the
> logged
> > in user) What I would like to know is how should the link be set up to
> pass
> > the value (the value of the oUser.sAMAccountName that is being clicked)
> and
> > to put it into the script below. I know how to set up a hyperlink but
> need
> > to know how it should read (is it like
> > www.bbhtx.org/information.asp?oUser.sAMAccountname="rcohen" or something
> > like that)? And how would I declare the value in the new page? Please
> > advise.
> >
> > <%
> > d = Request.ServerVariables("REMOTE_USER")
> > p = Instr(d, "\")
> > logonUser = Right(d, Len(d) - p)
> >
> > On Error Resume Next
> > Dim oContainer
> >
> > Dim FileSystem
> >
> > Set
> >
>
oContainer=GetObject("LDAP://ou=Staff,DC=baltimorebehavioralhealth,DC=org")
> >
> > EnumerateUsers oContainer
> >
> > Set oContainer = Nothing
> >
> > Sub EnumerateUsers(oCont)
> > Dim oUser
> > For Each oUser In oCont
> > Select Case LCase(oUser.Class)
> > Case "user"
> >
> > If oUser.sAMAccountName= logonUser Then
>
>