Sunday 15 July 2007 5:10:41 am
Hello Martin You probably need to log in as a user that haves the right policies to remove the nodes. See http://ezpedia.org/wiki/en/ez/command_line_scripts for a generic script example. One option is to use
$useStandardOptions = array( 'user' => true );
Afterwards, you can specify login and password on the command line with --login and --password If you want to run the script from cron, you're probably better off with the second option:
include_once( 'kernel/classes/datatypes/ezuser/ezuser.php' );
$user = eZUser::fetchByName( 'admin' );
$userID = $user->attribute( 'contentobject_id' );
eZUser::setCurrentlyLoggedInUser( $user, $userID );
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|