AddWorkgroupUser
Creates a new user and add them to a workgroup.
Syntax
AddWorkgroupUser( WorkgroupRef, UserName, EmailAddress, UserRoles, CreateAuthenticationInfo, Password, TempPasswordVariable, AutoAuthentication, AuthenticateUsingEmail );
Parameters
Parameter Name | Type | Description | Optional? | Default Value |
---|---|---|---|---|
WorkgroupRef | String | The name of the workgroup you want to add the user to. | No | n/a |
UserName | String | The name of the new user. | No | n/a |
EmailAddress | String | The email address of the new user. | No | n/a |
UserRoles | String | The roles you want to assign to the new user. If you include more than one role in this argument, you must separate them with commas. |
Yes | "" |
CreateAuthenticationInfo | Boolean | Determines whether the new user should have .net authentication. If .net authentication is not given, the new user will be registered but will have no login credentials. If authentication is provided, a .net membership will be assigned to the KnowledgeKube user. | Yes | 0/False |
Password | String | The new user's password. If this argument is left blank a temporary password will be randomly generated and assigned to the variable specified in the TempPasswordVariable argument. | Yes | "" |
TempPasswordVariable | String | The name of a variable into which the temporary password will be placed. Only necessary if no Password is specified by the preceding argument. | Yes (see Description) | "" |
AutoAuthentication | Boolean | Determines whether the new user should be logged into the current session automatically after the account is created. Only necessary if the CreateAuthenticationInfo argument is set to 1/True. | Yes (see Description) | 0/False |
AuthenticateUsingEmail | Boolean | Determines whether or not the user's email address should be used for their .net user name. If this is set to 0, their UserName will be used instead. Only necessary if the CreateAuthenticationInfo argument is set to 1/True. | Yes (see Description) | 0/False |
All arguments relating to authentication are a legacy feature. New users are automatically authenticated when created using the Add User interface in the Manage Users window. On the other hand, users created using this function are not automatically authenticated unless the AutoSignIn argument is True. As such, if that argument is not used, the AuthenticateUsingEmail argument will be needed to manually authenticate the user by clicking the Add User Authentication button in the Workgroup Members window. If the AutoAuthentication argument is used then the others are not required.
Output
If successful, the function will return a value of True; otherwise, it will return False.