UserGroupRemove

You can use the UserGroupRemove function to revoke one or more groups from an user. This function removes users from security groups and revokes group-based permissions and access rights.

When to use

You can use this function to:

  • Revoke one or more groups from an Optiva user.
  • Automate user group management.

When not to use

You cannot use this function when the access collection security is active.

Syntax

int UserGroupRemove(string UserCode, string GroupsList)

Parameters

Parameter Type Required Description
UserCode string Yes The user code or user name that identifies the Optiva user from whom groups will be removed.
GroupsList string Yes A single group name or a semicolon-separated list of group names to remove from the user.

Return Value

The application returns a value greater than 0 if the operation is successful. Otherwise, the operation fails.

Impact

The user loses the permissions associated with the removed group or groups.

Prerequisites

  • The target user must exist in the system.
  • The specified groups must exist in the system.

Examples

Example 1
Remove a single group from a user.
UserGroupRemove("FSI", "ADMIN");
Example 2
Remove multiple groups from a user.
UserGroupRemove("FSI", "ADMIN;CORE");