UserGroups
The UserGroups method tells which groups a user is in. (Version 4.0f and up).
Syntax
UserGroups(userName, groupList)
Parameters
-
userName
-
Specifies the user's name
-
groupList
-
Returns a delimited string containing the groups the user is a member of (if any). See example.
Return Values
Returns the number of groups the user is in, or -tve for error
Example
The following example adds the user PeterXX.
<%
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
%>
<%
groupString = "" 'be sure to include this line
result = AuthX.UserGroups("George", groupString)
response.Write("Group string: " & groupString & "<P>")
groupArray = Split(groupString, chr(1))%>
<% If result < 0 Then %>
Error: <%= result %>
<% Else
response.Write(result)%>
Groups: <P>
<%
for cNumber = 0 To UBound(groupArray)
response.Write("Group " & cNumber & ": " & groupArray(cNumber) & "<br>")
Next
End If %>
Applies To
AuthentiX OCX Component
http://www.flicks.com/authentix/discover/main.htm