This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » help fetching user list
expandshrink

help fetching user list

help fetching user list

Thursday 06 May 2004 11:40:00 am - 4 replies

hi all
i'm trying to fetch (on the frontend of my site) the list of all the users of my site.
i'm not able to display any information, also if i setup the anonymous role to * * *.

there's the code:

			{let customers_list=fetch( user, tree, hash( parent_node_id, 508,
						  sort_by, array( name, true() ) ) )}
			
				{section name=Customers loop=$customers_list}
					-{$Customers:item.name}<br>
				{/section}			  

						  
			{/let}

any hint?
best regards
alessandro

Thursday 06 May 2004 12:12:22 pm

Hi

Well I am using this to fetch the latest user on my site and it works fine. I note that I use content instead of user in my fetch.. Please remember to change parent_node_id and class_filter_array (I am using my own customized user class)

{* Fetch the latest 5 members *}
{let new_members=fetch('content',tree,
hash(parent_node_id,5,main_node_only, true(),class_filter_type, "include", class_filter_array, array(33),sort_by,array(published,false()) ))}

<div class="latest_box">
<h2>{'New members'|i18n("design/gsa/node/view"blunk.gif Emoticon}</h2>

<ul>
{section loop=$new_members}
<li>{node_view_gui view=line content_node=$item}</li>
{/section}
</ul>
{/let}
</div>

Thursday 06 May 2004 12:24:55 pm

mm
still doesn't work..

			{let customers_list=fetch('content',tree,
			hash(parent_node_id,2,main_node_only, true(),class_filter_type, "include", class_filter_array, array(34),sort_by,array(published,false()) ))}
				<ul>
				{section name=Customers loop=$customers_list}
					<li>{node_view_gui view=line content_node=$item}</li>
				{/section}
				</ul>			
			{/let}
</code

2 is the node_id of the home node... is it right?

icq# 326 457 502

Thursday 06 May 2004 12:56:36 pm

Hi.

2 is the home node, but that's not where the users are stored.
In the admin interface, go to the users tab and hold your cursor over the user group you want to fetch from. In the status bar of your browser you'll see the node id you want.

Regards Bjørn

Thursday 06 May 2004 2:13:36 pm

Hi Bjørn

2 is the default parent node for all users.. Unless you have changed the EZ installation seriously, the above should fetch all users of class 34!. Since I am using tree it should fetch all the users within the various user groups also. But do remember that you have to set your user class id correctly. Secondly make sure that the anonymous user are allowed to see the users, i.e. have read access in section 2!

Cheers
Tore

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from