A
Andy
Hi,
Does anybody know how to use the function authenticateUser in asp?
When I load my asp page, it should pass the logged on user to a variable
called 'vCreator' which should then be shown within a textbox on the screen.
My code for this section is as follows, but for some reason the field
appears blank???
***************
We run on AD 2003 in mixed mode
authenticateUser Request.ServerVariables("LOGON_USER")
Sub authenticateUser(nt_user)
Dim slashpos, spacepos, nt_user1, nt_userfirst, nt_userlast
slashpos = instr(nt_user,"\")
if slashpos <> 0 then
nt_user1 = mid(nt_user, slashpos + 1, len(nt_user)-(slashpos))
spacepos = instr(nt_user1," ")
end if
if spacepos <> 0 then
nt_userlast = Right(nt_user1, len(nt_user1) - (spacepos))
nt_userfirst = mid(nt_user, 4, spacepos)
end if
vCreator = nt_user1
vFrom = nt_userfirst & "." & nt_userlast & "@eastbourne.gov.uk"
End Sub
*************
Thanks
Andy
Does anybody know how to use the function authenticateUser in asp?
When I load my asp page, it should pass the logged on user to a variable
called 'vCreator' which should then be shown within a textbox on the screen.
My code for this section is as follows, but for some reason the field
appears blank???
***************
We run on AD 2003 in mixed mode
authenticateUser Request.ServerVariables("LOGON_USER")
Sub authenticateUser(nt_user)
Dim slashpos, spacepos, nt_user1, nt_userfirst, nt_userlast
slashpos = instr(nt_user,"\")
if slashpos <> 0 then
nt_user1 = mid(nt_user, slashpos + 1, len(nt_user)-(slashpos))
spacepos = instr(nt_user1," ")
end if
if spacepos <> 0 then
nt_userlast = Right(nt_user1, len(nt_user1) - (spacepos))
nt_userfirst = mid(nt_user, 4, spacepos)
end if
vCreator = nt_user1
vFrom = nt_userfirst & "." & nt_userlast & "@eastbourne.gov.uk"
End Sub
*************
Thanks
Andy