Project

General

Profile

Bug #2720 » 2720-pt2.patch

krileon, 14 October 2011 21:59

View differences:

components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php
$lists['gid'] = "<input type=\"hidden\" name=\"gid\" value=\"$user->gid\" /><strong>Administrator</strong>";
} 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++;
}
}
if ( checkJversion() == 2 ) {
$lists['gid'] = moscomprofilerHTML::selectList( $gtree, 'gid[]', 'class="inputbox" size="11" multiple="multiple"', 'value', 'text', $user->gids, 2, false );
} else {
(2-2/2)