| Thursday 18 December 2008 3:54:59 am 
                                                                 Andre, Thanks again for putting effort in helping me find a solution. It most certainly increase the speed of the application, the final code: 
					$node_id = $relation["node_id"];
					$subtreeFetchParams = array(
						'ClassFilterType' => 'include',
						'ClassFilterArray' => array(29),
						'Limitation' => array(),
					);
					$childNodes =& eZContentObjectTreeNode::subTree($subtreeFetchParams, $node_id);                              					
					foreach( $childNodes as $child )
					{                                                               
					   $chContentObject =& $child->object();
					   $datamap = $chContentObject->dataMap();
					   $emailsOfReceivers[] = $datamap['email']->content();
					}//foreach childnodes
Unfortunately, the $chContentObject had to be stored in between, before I could get the datamap, but this is already a great improvement. Thanks also for introducing the 'Limitation' = array() to me, because I was already logging a dedicated user in via: 
		/*
		 * Log the current logged in user, in order to make sure that we are able to log
		 * him/her in after this event is done. Needed because we change users in the middle.
		 */
		$eZUser = eZUser::currentUser();
		$userID = eZUser::currentUserID();
		
		/*
		 * Login the user that is used for sending the press releases 
		 * (and will be able to read the newsitems / images)
		 *
		 * This is needed because this is being executed by a workflow.
		 */
		$loginResult = eZUser::loginUser("x_read","x");
		if(!$loginResult)
		{
			return $module->handleError( EZ_ERROR_KERNEL_ACCESS_DENIED, 'kernel' );
		}
and then logging out and re-setting the currently loggged in user, so this is a great contribution! 
Thanks again :),Clemens
 |