CookieCurrentUsername
The CookieCurrentUsername
gets the username of the current user when using Cookie-based protection.
Only applies to per-directory cookie login. For site-wide cookies use the code snippet here.
See Also
CookieLoginValue
Syntax
CookieCurrentUsername(cookieValue)
Parameters
-
cookieValue
-
The cookie identifying the user.
Return Values
Returns the username.
Example
<%
usingAuthentiXStandard = true
if (usingAuthentiXStandard) then
Set AuthX = Server.CreateObject("AUTHXOCX.AuthXOCXCtrl.1")
else
Set AuthX = Server.CreateObject("AUTHXISP.AuthXOCXCtrl.1")
protectedDomain = Request.ServerVariables("LOCAL_ADDR")
'protectedDomain = "hostheader.com"
AuthX.SetVirtualDomain protectedDomain, Request.ServerVariables("SCRIPT_NAME")
AuthX.SetVirtualDomainPassword("")
end if
protectedAbsPath = "c:\aspmail\ACookieLogin\example2\members\"
cookieName = AuthX.CookieLoginCookieName(protectedAbsPath, _
"" _
)
currentUser = AuthX.CookieCurrentUserName(Request.Cookies(cookieName))
%>
Current User is <%= currentUser %>
Applies To
AuthentiX OCX Component
http://www.flicks.com/authentix/discover/main.htm