USER Methods
User status
login(), logout(), admin(), groups(), status()Creating and deleting users
create(), update(), delete()User information
index(), details(), directory()User registration
evaluate(), register(), hash(), activate(), password()
groups()
Gets list of groups the current user is assigned to or checks if user is part of a certain group.
mixed groups([ int check ])
Return
List of groups or TRUE if user is part of a group
Parameter
Description
checkCheck if user is part of this group
Get groups of current user
$USER->groups()
RETURN: ARRAY [1]
Check if user is part of group
$USER->groups(5)
RETURN: TRUE