RemoveGroupMembership Method (PIUser object)

               

 

This method removes a PIUser from a PIGroup given the group's name.

 

Syntax

object.RemoveGroupMembership GroupName

The RemoveGroupMembership method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PIUser object.

GroupName

A string containing the name of the PIGroup from which the user should be removed.

 

Remarks

PIGroup names can be retrieved from PIGroup objects which are obtained from the Server.PIGroups collection or from another user's PIGroups collection. Only logged on user's who have write access to the server's user database can successfully remove groups from users. Access permissions on the user database are maintained on the server for security (for PI on Windows NT and UNIX systems this is stored in the DBSecurity table).

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseACCESSDENIED

Caller does not have sufficient privilege to modify the PIUser.

pseNOEMPTYSTRINGS

The passed group name must be non blank.

pseUSRNOTINGROUP

The user is not a member of the passed group.

pseUSERDATAUPDATE

Unable to update user data on the server.

Enabling Operational Intelligence