Forums / Setup & design / help fetching user list

help fetching user list

Author Message

Alessandro Cipriani

Thursday 06 May 2004 2:40:00 am

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

Tore Skobba

Thursday 06 May 2004 3:12:22 am

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")}</h2>

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

Alessandro Cipriani

Thursday 06 May 2004 3:24:55 am

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

Bjørn Kaarstein

Thursday 06 May 2004 3:56:36 am

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

Tore Skobba

Thursday 06 May 2004 5:13:36 am

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

eZ debug

Timing: Jan 18 2025 11:22:31
Script start
Timing: Jan 18 2025 11:22:31
Module start 'content'
Timing: Jan 18 2025 11:22:31
Module end 'content'
Timing: Jan 18 2025 11:22:31
Script end

Main resources:

Total runtime0.2442 sec
Peak memory usage4,096.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 588.8203180.8438
Module start 'content' 0.00750.0090 769.664197.9766
Module end 'content' 0.01650.2277 867.6406526.7500
Script end 0.2442  1,394.3906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00381.5634200.0002
Check MTime0.00140.5820200.0001
Mysql Total
Database connection0.00130.537210.0013
Mysqli_queries0.187176.59031410.0013
Looping result0.00230.94681390.0000
Template Total0.227193.010.2271
Template load0.00130.536410.0013
Template processing0.225792.427410.2257
Override
Cache load0.00100.422110.0010
Sytem overhead
Fetch class attribute can translate value0.00090.353410.0009
XML
Image XML parsing0.00040.149810.0004
General
dbfile0.00512.0764200.0003
String conversion0.00000.002030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs