Impossible to fetch Users

Author Message

Pierre T.

Wednesday 14 May 2008 7:58:43 am

I want to fetch all users registered in ezpublish (all users from all user groups). Here is the tree of the user group :

Users
|_ Guest Accounts
|_ Administrator Users
|_ Editors
|_ Anonymous Users

The node <Users> has ID 5. So, according to the documentation about fetching content, I could write :

{def $nodes=fetch ( 'content', 'list', hash( 'parent_node_id', 5 ) ) }
{foreach $nodes as $node}
     {$node.name|wash}
{/foreach}

But nothing appears...

I try to change the parent_node_id by the node_id of the root node of the website and the fetch works. Why I can't fetch the node of Users ? (I have currently users in Administrator Users)

André R.

Wednesday 14 May 2008 8:28:29 am

Are you logged in as a user with read access to those nodes when you try this? ( for instance logged in as admin )

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Maxime Thomas

Sunday 18 May 2008 10:26:35 pm

Hi,

You can also add to the hash the following parameter :

'limitation', array()

It allows your fetch to override the current read rights and actually fetch the nodes you would like it to fetch.

Hope it helps.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Pierre T.

Tuesday 20 May 2008 1:31:18 am

Thanks a lot Maxime & André, It works now (read rights problem) !

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 20 2025 17:31:16
Script start
Timing: Jan 20 2025 17:31:16
Module start 'layout'
Timing: Jan 20 2025 17:31:16
Module start 'content'
Timing: Jan 20 2025 17:31:16
Module end 'content'
Timing: Jan 20 2025 17:31:16
Script end

Main resources:

Total runtime0.0427 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 587.9141151.2109
Module start 'layout' 0.00690.0030 739.125036.6484
Module start 'content' 0.00990.0305 775.773494.2656
Module end 'content' 0.04040.0023 870.039133.9922
Script end 0.0427  904.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00296.7404140.0002
Check MTime0.00122.8529140.0001
Mysql Total
Database connection0.00112.583410.0011
Mysqli_queries0.00347.975230.0011
Looping result0.00000.042410.0000
Template Total0.00174.010.0017
Template load0.00153.442210.0015
Template processing0.00020.580310.0002
Override
Cache load0.00122.747510.0012
General
dbfile0.020547.991680.0026
String conversion0.00000.016740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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