# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php +++ components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php @@ -3615,34 +3615,8 @@ $lists['gid'] = "gid\" />Administrator"; } else { // ensure user can't add group higher than themselves - if ( checkJversion() <= 0 ) { - $my_groups = $_CB_framework->acl->get_object_groups( 'users', $_CB_framework->myId(), 'ARO' ); - } else { - $aro_id = $_CB_framework->acl->get_object_id( 'users', $_CB_framework->myId(), 'ARO' ); - $my_groups = $_CB_framework->acl->get_object_groups( $aro_id, 'ARO' ); - } + $gtree = $_CB_framework->acl->get_groups_below_me(); - if ( is_array( $my_groups ) && ( count( $my_groups ) > 0 ) ) { - $ex_groups = $_CB_framework->acl->get_group_children( $my_groups[0], 'ARO', 'RECURSE' ); - if ( $ex_groups === null ) { - $ex_groups = array(); // mambo fix - } - } else { - $ex_groups = array(); - } - - $gtree = $_CB_framework->acl->get_group_children_tree( null, 'USERS', false ); - - // remove users 'above' me - $i = 0; - while ( $i < count( $gtree ) ) { - if ( in_array( $gtree[$i]->value, $ex_groups ) ) { - array_splice( $gtree, $i, 1 ); - } else { - $i++; - } - } - \ No newline at end of file if ( checkJversion() == 2 ) { $lists['gid'] = moscomprofilerHTML::selectList( $gtree, 'gid[]', 'class="inputbox" size="11" multiple="multiple"', 'value', 'text', $user->gids, 2, false ); } else {