Project

General

Profile

Bug #2287 » 2287b.patch

krileon, 04 February 2011 18:35

View differences:

administrator/components/com_comprofiler/library/cb/cb.tables.php
if ( checkJversion() == 2 ) {
global $_CB_framework;
$this->gids = array_values( JFactory::getUser( $this->id )->groups );
$this->gids = array_values( (array) JFactory::getUser( $this->id )->groups );
$this->gid = (int) $_CB_framework->acl->getBackwardsCompatibleGid( $this->gids );
} elseif ( checkJversion() == 0 ) {
if ( checkJversion( 'dev_level' ) < 11 ) {
......
if ( checkJversion() == 2 ) {
global $_CB_framework;
$this->gids = array_values( JFactory::getUser( $this->id )->groups );
$this->gids = array_values( (array) JFactory::getUser( $this->id )->groups );
$this->gid = (int) $_CB_framework->acl->getBackwardsCompatibleGid( $this->gids );
} else {
$this->gids = array( $this->gid );
......
if ( $_CB_database->loadObject( $oldEntry ) ) {
$oldUsername = $oldEntry->username;
if ( checkJversion() == 2 ) {
$oldGids = array_values( JFactory::getUser( $this->id )->groups );
$oldGids = array_values( (array) JFactory::getUser( $this->id )->groups );
$oldGid = (int) $_CB_framework->acl->getBackwardsCompatibleGid( $oldGids );
} else {
$oldGid = (int) $oldEntry->gid;
......
}
} else {
if ( checkJversion() == 2 ) {
$this->_cmsUser->groups = $this->gids;
$this->_cmsUser->groups = (array) $this->gids;
}
$result = $this->_cmsUser->save(); // Joomla 1.5 native
if ( ! $result ) {
(2-2/2)