Monday 20 February 2006 2:08:07 am - 2 replies
Aleksander Lech
Wednesday 22 February 2006 12:41:23 am
Well, searching brings no solution :(
{def $user=fetch( 'user', 'current_user' )} Group(s): {$user.groups|implode(', ')} <br />
Shows current users' groups, but I want to get groups of user with for example id=523
I didn't find apropriate function :( Function user - according to docs - can fetch current_user but how to fetch user of given id??
Aleksander
Ćukasz Serwatka
Wednesday 22 February 2006 1:21:54 am
You can fetch user object, then access user_account. Try with this code:
{ * Replace user_account with your attribute user account name * } {def user_object=fetch( 'content', 'object', hash( 'object_id', 14 ) )} {$user_object.data_map.user_account.content.groups|attribute(show,1)}
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
You must be logged in to post messages in this topic!