Groups are a way to clump users together. Groups can be used for permissions, organization/filtering, and additional programmatic functionality.

Getting the Group Object

$group = Group::getByID($groupID)

$group = Group::getByName($groupName)

These methods will return a Group object.

Group Object Methods

$members = $group->getGroupMembers($type = null)

Get an array of UserInfo objects belonging to the gropu. An optional type may be specified, but $type will only ever be non-null if you add users to groups programmatically.

$num = $group->getGroupMembersNum($type = null)

Gets the count of users in a Group without retrieving all UserInfo objects.

$group->delete()

Delete a User Group.

$group->getGroupName()

Returns the name of the group.

$group->getGroupDescription()

Returns the description of a group.

$group = Group::add($groupName, $groupDescription)

Creates a new group.

$group->update($groupName, $groupDescription)

Updates the name and description of a group.


Recent Discussions on this Topic

Administrators Cannot Add a Page

Hey, was wondering if anyone was having the same problem as me, Fresh install of 5.4+ make a new user account and add it to the Admin group sign in as them, you can't add a page, i checked the permissions, i even turned on advanced permissions an…

Advanced Permissions Broken by Apostrophe in Page Type Names

If you have clients/users creating Page Types while using Advanced Permissions this may impact you. “Page Type” Names need validation ASAP – apostrophes break the javascript that manually adds users / groups to the advanced permissions for any given…

Reset Group Permissions

Hi Is there a way to reset group permissions within concrete? Some time while building the site i was playing with user groups getting familiar with how they worked and now i've put the site live but forgot to change everything back and i appear to ha…

Adding a person to a Group

I need to know how to add someone to one of the groups on our website who is already a registered member, but not yet in a particular group

Hiding Blocks from Add Blocks BlockList

Hi, I'm relatively new to developing c5 and I have the following situation. -I would like add to the existing permissions model the ability to allow/disallow users to add blocks of a certain type. i.e. If I only want a group called "flash_contribut…