Skip to content

UserGroups ​

Type
Class
Namespace
craft\web\twig\variables
Inherits
craft\web\twig\variables\UserGroups
Since
3.0.0
Deprecated in
in 3.0.0

User group functions.

View source

Public Methods ​

MethodDescription
getAllGroups()Returns all user groups.
getGroupByHandle()Gets a user group by its handle.
getGroupById()Gets a user group by its ID.

getAllGroups() ​

Returns all user groups.

View source

Arguments ​

Returns ​

craft\models\UserGroup[]

getGroupByHandle() ​

Gets a user group by its handle.

View source

Arguments ​

Returns ​

craft\models\UserGroup, null

getGroupById() ​

Gets a user group by its ID.

View source

Arguments ​

Returns ​

craft\models\UserGroup, null