I have used the following code to obtain a HierarchyManager:
--CODE--
SimpleCredentials sc = new SimpleCredentials(
ContentRepository.SYSTEM_USER, ContentRepository.SYSTEM_PSWD ) ;
...
hierarchyManager.init( session.getRootNode() ) ;
hierarchyManager.setAccessManager( accessManager ) ;
--End of CODE--
try this instead:
HierarchyManager hm = SessionAccessControl.getHierarchyManager(request,
"users");
then I used it to create a new node in the users repository. ( calling
the
save method )
hm.createContent("/","newUser", ItemType.CONTENT)
hm.save();
Philipp Bracher
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------