GroupAddNewUser
The GroupAddNewUser method adds an new user to an existing group.
Syntax
GroupAddNewUser(groupName, userName, password, notes, expirationDate)
Parameters
-
groupName
-
Specifies the (existing) group in which to place the new user.
-
userName
-
Specifies the name of the new user to add.
-
password
-
Specifies the user's password
-
Notes
-
Notes associated with the the user
-
expirationDate
-
Specifies the date/time the user's access expires (0 for Never)
Return Values
Returns 0 if the new user is added to the group,
1 if the group does not exist,
2=failed,
3 if the user exists already
Example
The following example adds the user PeterXX to the group "Members".
<%
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.GroupAddNewUser("members", "PeterXX", "Peter", "Peters Notes", 0)
%>
<% If result = 0 Then %>
Successfully added
<% Else %>
Could not add him
<% End If %>
Applies To
AuthentiX OCX Component
http://www.flicks.com/authentix/discover/main.htm