UserGroupsVariable

Type
Class
Namespace
Craft
Inherits
Craft\UserGroupsVariable
Since
1.0

User group functions.

See also http://craftcms.com

View source (opens new window)

# Public Methods

Method Description
getAllGroups() Returns all user groups.
getAssignableGroups() Returns the user groups that the current user is allowed to assign to another user.
getGroupByHandle() Gets a user group by its handle.
getGroupById() Gets a user group by its ID.

# getAllGroups()

Signature

public Craft\UserGroupModel[] getAllGroups ( $indexBy = null )

# getAssignableGroups()

Returns the user groups that the current user is allowed to assign to another user.

View source (opens new window)

Arguments

Returns

Craft\UserGroupModel[]

Signature

public Craft\UserGroupModel[] getAssignableGroups ( Craft\UserModel $user = null )

# getGroupByHandle()

Gets a user group by its handle.

View source (opens new window)

Arguments

Returns

Craft\UserGroupModel, null (opens new window)

Signature

public Craft\UserGroupModel, null getGroupByHandle ( $groupHandle )

# getGroupById()

Signature

public Craft\UserGroupModel, null getGroupById ( $groupId )