Flicks FAQ: Grouphasuser


Back to the top of the FAQ

GroupHasUser

The GroupHasUser method checks to see if the user is a member of an existing group.

Syntax

GroupHasUser(groupName, userName)

Parameters

groupName
Specifies the group to check.
userName
Specifies the user to be checked for.

Return Values

Returns 0 if the user is a member of the group, 1 if the user is not , 2=group does not exist

Example

The following example checks for Brian in Premier Group.

<% 
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
%>
<% 
result = AuthX.GroupHasUser("Premier Group", "Brian")
%>
<% If result = 0 Then %>
He is there
<% Else %>
Not found.
<% End If %>

Result of GroupHasUser is: <%= result %>

Applies To

AuthentiX OCX Component

http://www.flicks.com/authentix/discover/main.htm

Back to the top of the FAQ