define variable usr as IUser no-undo.
usr = service:NewUser("MyUser@MyDomain"). /* Set properties */ . . . service:CreateUser(usr). . . . usr = service:GetUser("MyUser@MyDomain"). /* Set properties */ . . . service:UpdateUser(usr). . . . service:DeleteUser("MyUser@MyDomain"). |
define variable userSet as IUserSet no-undo.
userSet = service:GetUsers(). usr = service:NewUser("Fred@ABCDomain"). /* Set properties */ . . . userSet:Add(usr). usr = userSet:Find("Admin"). usr:Description = "The Admin user for the default domain.". usr = userSet:Find("Fred "). userSet:Remove(usr). service:UpdateUsers(userSet). |
domain = service:GetDomain("ZZDomain"):
users = domain:Users(). user = service:NewUser("John"). /* Set properties */ . . . users:Add(user). service:UpdateDomain(domain). |