Forums / Developer / HOWTO ? eZScript without permissions

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

HOWTO ? eZScript without permissions

Author Message

Björn X

Thursday 16 September 2004 9:38:59 am

I was wondering...

What is the best way to let a script run with all permissions(Rights and Roles disabled)? Currenlty I bypassed this issue by always logging in as user "admin":

// login as admin
include_once( 'kernel/classes/datatypes/ezuser/ezuser.php' );
$user = eZUser::fetchByName('admin');
$user->loginCurrent();

Is there maybe a better way to disable permissions when running an eZScrpit instance from CLI?

Thanks and advance

Bård Farstad

Thursday 16 September 2004 10:10:33 am

This would be a good way. It is not possible to disable permissions though, so you need to log in. Much of the functionality depends on a user beeing logged in.

--bård

Documentation: http://ez.no/doc

Björn X

Thursday 16 September 2004 10:16:31 am

Y you are right about the functionality, I forgot about it.

Thx for the reply.