sal21
-
Total Posts
:
18
- Scores: 0
-
Reward points
:
0
- Joined: 2/13/2008
-
Status: offline
|
read logged username....
Wednesday, February 13, 2008 10:36 PM
( permalink)
Hi all my first post! Sorry for my english (I'm Italian from Napoli) Have this code, and it work. But instead to assign to the var sUserName OI24683 (Is my username on Nt server DIP) Is possible to read from LDAP or ADSI or WScript.Network bthe real username of user logged in computer and assign to the var sUserName ???? Tks. code: <html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Nuova pagina 1</title> </head> <body> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% 'test_ldap_USER_IN_GROUP_OK.asp dim sDomain dim sUserName sUserName = "OI24683" sDomain = "DIP" Set oUser = GetObject("WinNT://" & sDomain & "/" & sUserName & ",user") For Each oGroup In oUser.Groups Select Case(oGroup.Name) Case "InpdapNAXX" 'Response.write("InpdapNAXX") Response.Redirect("./default.html") Case "Group B" 'response.write("Yay") Response.Redirect("A.asp") Case "Group C" response.Redirect("Z.asp") Case "Group D" Response.redirect("Y.asp") End Select Next %> </body> </html>
|
|
|
|