CimUserList.New (method)

Creates a new user.
Syntax: Set CimUser = object.New ( UserID )
UserID As String - Name of the new user
Description: CimUserList.New returns a new CimUser object. This is the method to call to create a new user. You must call CimUserList.Save to save the user to the project.


Dim project As CimProject
Set project = CreateObject("CimProject")
project.OpenLocalProject "d:\classes\classes.gef"
Dim users As CimUserList
Dim user As CimUser
Set users = project.Users
Set user = users.New("JSMITH")
user.RoleID = "OPER"
user.PasswordNeeded = True
user.Password = "JIM"
user.Enabled = True
user.PasswordExpiresDays = 0
user.UserName = "John Smith"
users.Save user, False