AddUser Method (PIGroup object)

                  

 

This method adds the passed PIUser to the PIGroup.

 

Syntax

object.AddUser NewUser

The AddUser method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PIGroup object.

NewUser

A PIUser object to be added to this PIGroup.

 

Remarks

PIUser objects can be obtained from the Server.PIUsers collection or from another PIGroup's PIUsers collection. Only logged on user's who have write access to the server's user database can successfully add users to groups. 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 PIGroup.

pseUSERINGROUP

User is already a member of the group.

pseUSERDATAUPDATE

Unable to update user data on the server.

Enabling Operational Intelligence