Forums / Developer / List of available user groups

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

List of available user groups

Author Message

Lo' F.

Thursday 21 April 2011 9:59:55 am

Hi guys,

Is there a way I can fecth a list of the available user_group under a user_group parent of the Users's section?

Something like this ... which sadly doesn't work! - where 199 is the id node of the user group under which there are the groups I need to list

{def $groups=fetch( 'content', 'list', hash( 'parent_node_id', 199) )}
 
{foreach $groups as $group}
   {$group.name} <br />
{/foreach}

Thanks!

loredanaebook.it

Marko Žmak

Thursday 21 April 2011 11:38:58 pm

Yes Lo, the example you gave is exactly how you should do it, but it would also be usefull to use class filter, take a look at the documentation for the content/list fetch function:

  • http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Modules/content/Fetch-functions/list

And your example should work, I don't see any reason why it shouldn't. But here are some ideas:

  • maybe the node id (199) is wrong
  • does the anonymous user have the permission to read "User group" class?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Lo' F.

Friday 22 April 2011 3:14:49 am

Hi Marko,

Right, it was a matter of permission. Thanks!

loredanaebook.it