Skip to the content
Documentation

fetching groups of the current user

No ratings yet

For fetching the groups of the current user you can use:

{def $user=fetch( 'user', 'current_user' )}

{foreach $user.groups as $key => $group}
{def $group=fetch( 'content', 'object', hash( 'object_id', $user.groups[$key] ) )}
  User is Member of: {$group.name} <br/>
{/foreach}