Thursday 06 October 2005 7:23:42 am
This is some code from <i>kernel/role/assign.php</i>:
include_once( 'kernel/classes/ezrole.php' );
$role =& eZRole::fetch( $roleID );
$role->assignToUser( $userID, $limitIdent, $limitValue );
// Clear role caches.
eZRole::expireCache();
include_once( 'kernel/classes/ezcontentcachemanager.php' );
eZContentCacheManager::clearAllContentCache();
/* Clean up policy cache */
include_once( 'kernel/classes/datatypes/ezuser/ezuser.php' );
eZUser::cleanupCache();
where $limitIdent is 'subtree' or 'section', and $limitValue is the top node of the subtree or the section id. Don't be afraid to dig into the kernel code ;-) In there you will find almost everything you need.
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|