Project

General

Profile

Bug #2436 ยป 2436.patch

krileon, 18 March 2011 19:53

View differences:

administrator/components/com_comprofiler/library/cb/cb.acl.php
if ( checkJversion() >= 2 ) {
$ps = array( 'Public' => 1, 'Registered' => 2, 'Author' => 3, 'Editor' => 4, 'Publisher' => 5, 'Manager' => 6, 'Administrator' => 7, 'Superadministrator' => 8 );
} else {
$ps = array( 'Public' => 29, 'Registered' => 18, 'Author' => 19, 'Editor' => 20, 'Publisher' => 21, 'Manager' => 23, 'Administrator' => 24, 'Superadministrator' => 25 );
$ps = array( 'Root' => 17, 'Users' => 28, 'Public' => 29, 'Registered' => 18, 'Author' => 19, 'Editor' => 20, 'Publisher' => 21, 'Backend' => 30, 'Manager' => 23, 'Administrator' => 24, 'Superadministrator' => 25 );
}
}
if ( array_key_exists( $v, $ps ) ) {
......
. "\n FROM " . $_CB_database->NameQuote( '#__user_usergroup_map' )
. "\n WHERE " . $_CB_database->NameQuote( 'user_id' ) . " = " . (int) $user_id;
$_CB_database->setQuery( $query );
$gid[$user_id] = (int) $_CB_database->loadResult();
$gids = $_CB_database->loadResultArray();
$gid[$user_id] = (int) $this->getBackwardsCompatibleGid( $gids );
} else {
$query = 'SELECT ' . $_CB_database->NameQuote( 'gid' )
. "\n FROM " . $_CB_database->NameQuote( '#__users' )
    (1-1/1)