Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<%
Function getLogon()
getLogon = (Mid(Request.ServerVariables("LOGON_USER"), _
InStrRev(Request.ServerVariables("LOGON_USER"), "\") + 1))
End Function
Sub getUser(sLogon)
Set oRootDSE = GetObject("LDAP://RootDSE")
sDomain = oRootDSE.Get("defaultNamingContext")
Set oConn = CreateObject("ADODB.Connection")
oConn.Open ("Data Source=Active Directory Provider;Provider=ADsDSOObject;User ID=domain\test_acct;password=1234567890;")
Set oRs = oConn.Execute("SELECT sn, givenName " & _
"FROM 'LDAP://" & sDomain & "' " & _
"WHERE samaccountname='" & sLogon & "'")
If Not oRs.EOF Then
If Not isNull(oRs("sn")) AND Not isNull(oRs("givenName")) Then
sLastName = oRs("sn")
sFirstName = oRs("givenName")
Response.Write "<b>Logon:</b>" & sLogon & "<br>" & _
"<b>Last Name:</b> " & sLastName & "<br>" & _
"<b>First Name:</b> " & sFirstName
End If
End If
oConn.Close
End Sub
getUser(getLogon)
%>