I have been working on a custom component but now hit on an issue where I need to set up groups for ACL reasons. However, I cannot seem to find a valid method - I've crashed things so far. The group setup happens in the installation script, or at least should. A previous answer suggested this:
JModelLegacy::addIncludePath( JPATH_ADMINISTRATOR . '/components/com_users/models/', 'UsersModel' ); $groupModel = JModelLegacy::getInstance( 'Group', 'UsersModel' ); $groupData = array( 'title' => "NHCommision", 'parent_id' => 5, 'id' => 9 ); $groupModel->save( $groupData );
However, it doesn't seem to be working in the final version of 2.5. Based on the "Legacy" add it might be ment for 3.0 - is there a 2.5 equivalent?