Permissions within scripts under /bin/php and cronjobs...

Author Message

Norman Leutner

Tuesday 12 September 2006 3:57:31 am

Hi,
I'm currently working on a php script which creates objects depending on user attributes.
Therefore a need to fetch a list of users within a given group.

Usually I use

$nodes =& eZContentObjectTreeNode::subTree( false, $subtreeNodeID );

to get the subtree of a secific node.

But the function does not return any result when using within this script.
The script is using anonymous access rights.

Has someone a hint for me how to change the access rights for the script?

Thanks in advance

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Claudia Kosny

Tuesday 12 September 2006 4:15:04 am

Hello Norman

You might try to log in as a user who has the correct permissions with

eZUser::loginUser( $login, $password );

(I have never tried this, just found it earlier on in another post)

Alternatively you could also provide the parameter limitation with an empty array as value - then you should get all nodes no matter what the access rights are.

Greetings from Luxembourg

Claudia

Norman Leutner

Tuesday 12 September 2006 4:57:18 am

Thanks for you hint Claudia,

the function works fine...

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

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 31 2025 07:33:40
Script start
Timing: Jan 31 2025 07:33:40
Module start 'layout'
Timing: Jan 31 2025 07:33:40
Module start 'content'
Timing: Jan 31 2025 07:33:41
Module end 'content'
Timing: Jan 31 2025 07:33:41
Script end

Main resources:

Total runtime1.3288 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.3594151.2266
Module start 'layout' 0.00630.0030 739.585936.6797
Module start 'content' 0.00931.3187 776.2656930.8828
Module end 'content' 1.32800.0008 1,707.148412.1094
Script end 1.3288  1,719.2578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2346160.0002
Check MTime0.00130.0953160.0001
Mysql Total
Database connection0.00080.060910.0008
Mysqli_queries1.272895.7858570.0223
Looping result0.00050.0404550.0000
Template Total1.290697.120.6453
Template load0.00230.170820.0011
Template processing1.288396.946820.6441
Template load and register function0.00130.099710.0013
states
state_id_array0.00230.169410.0023
state_identifier_array0.00170.125220.0008
Override
Cache load0.00190.1435260.0001
Sytem overhead
Fetch class attribute can translate value0.00050.034920.0002
Fetch class attribute name0.00220.162840.0005
XML
Image XML parsing0.00180.134020.0009
class_abstraction
Instantiating content class attribute0.00000.000650.0000
General
dbfile0.00430.3207170.0003
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs