Forums / Setup & design / Create role using php
Tamaki Hodge
Sunday 01 October 2006 8:52:00 pm
Hi,
Does anyone know how to create a role programmatically using php?
Thanks.
Ćukasz Serwatka
Sunday 01 October 2006 11:27:03 pm
Hi Tamaki,
Take a look on kernel/classes/ezrole.php class definition.
$role = eZRole::create( 'Role name' ); $role->store();
Related classes are also: kernel/classes/ezpolicy.phpkernel/classes/ezpolicylimitation.php
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Monday 02 October 2006 3:23:03 pm
Thanks Lukasz,
I managed to get something going.