Visual Guard Class Library Documentation

VGRoles.GetRolesForUserById Method 

Gets a list of the roles that a user is in.

public static VGRoleCollection GetRolesForUserById(
   String userId
);

Parameters

userId
The repository id of the user to return a list of roles for.

Return Value

A VGRoleCollection object containing the roles that the specified user is in.

Exceptions

Exception Type Condition
ArgumentNullException userId is null.
ArgumentException userId is an empty string.

-or-

userId was not found in the repository
SecurityException The current user has not enough privileges to use Membership API. The Membership access level of the application must be sufficient to allows this action or the 'Membership Manager' role must be granted to the user by using the Visual Guard console.

See Also

VGRoles Class | Novalys.VisualGuard.Security.Membership Namespace | RepositoryId