JavaScript API Class: Group
The Group class represents a Group of users. See the User and Site classes for methods to manage groups.
Properties
| Name | Type | Access |
Description |
| id |
Number |
read |
The system-generated ID for this group. |
| name |
String |
read/write |
The string identifier for this group. |
| users |
Array of Users |
read | Returns an array of User objects that are members of this group. |
| selected | Boolean | read |
This property is used by EditMe internals and isn't useful in scripts. |
Functions
| Name | Return Type |
Description |
| addUser (User) |
none |
Adds the given user to this group. The user is not actually added until the save() function is called on the group. A String containing a user name can be used in place of a user object. |
| containsUser (User) |
Boolean |
Returns true if the specified user is a member of this group. A String containing a user name can be used in place of a user object. |
| destroy() |
none | Permanently deletes this group. |
| removeUser (User) |
none |
Removes the given user from this group. The user is not actually removed until the save() function is called on the group. A String containing a user name can be used in place of a user object. |
| save () | none |
Saves the changes in name and membership made to this group, or creates a new group if the group does not yet exist. Use site.newGroup() and then call this method to create a new group. |
Return to Java Script API