Multiuser Lingo Dictionary > Multiuser Lingo Dictionary > getGroups

 

getGroups

Syntax

system.movie.getGroups
system.user.getGroups

Description

Multiuser Server command; when movie is specified, gets the list of groups for the application in the current connection, including the predefined group @AllUsers. When user is specified, returns a list of current groups the user is a member of.

The server responds with a message that has the same object and command in the #sender parameter, and the same #subject, and #contents comprising a list of strings naming the groups.

Examples

This statement retrieves the current list of groups in this movie connection:

errCode = gMultiuserInstance.sendNetMessage("system.movie.getGroups", "anySubject")

The server's response looks like this:

[#errorCode: 0, #recipients: ["userName"], #senderID: "system.movie.getGroups", #subject: "anySubject", #content: [#movieID: "theMovieName", #groups: ["@AllUsers", "@RedTeam", "@BlueTeam"]], #timeStamp: 79349843]

This statement returns a list of the current groups that the sender is a member of:

errCode = gMultiuserInstance.sendNetMessage("system.user.getGroups", "anySubject")

The returned list looks like this:

[#errorCode: 0, #recipients: ["userName"], #senderID: "system.user.getGroups", #subject: "anySubject", #content: [#userID: "userName", #groups: ["@AllUsers", "@Photographers", "@Designers"]], #timeStamp: 79349843]

See also

sendNetMessage()