JUser::save() using new definition for groups var ?

35 views
Skip to first unread message

Beat

unread,
Dec 14, 2010, 11:55:55 AM12/14/10
to Joomla! Framework Development
Until Joomla 1.6 beta 15, the JUser::save() function was using as
groups the definition of it:


/**
* Associative array of user group ids => names.
*
* @since 1.6
* @var array
*/
public $groups = array();

However now in SVN, this is not the case anymore.

It requires a numeric array of ids.

E.g.

$user->groups = array( 2 => 'Registered' );
$user->save();

works fine in Joomla 1.6 beta 1-15.

and now, in Joomla 1.6 SVN 19878, that does NOT work anymore: Joomla
now uses internally e.g. in backend user creation (simplified):

$user->groups = array( 0 => '2' );
$user->save();

But that doesn't work backwards with Joomla 1.6 beta, and additionally
is inconsistent with the result of:

JFactory::getUser( $this->id )->groups

is array( 2 => 'Registered' );

and the PHPdoc comment for var $groups still shows indexed array and
not numeric array.

As this breaks the Joomla API (and its use by Community Builder), I'm
posting in here as urgent request to clarify before Joomla 1.6 RC 1
release.

Many Thanks,
Beat
http://www.joomlapolis.com/

Beat

unread,
Dec 14, 2010, 12:03:43 PM12/14/10
to Joomla! Framework Development
As it seems pretty serious for Joomla 1.6 RC: Reported as bug here too
for tracking:

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=23774

Best Regards,
Beat
http://www.joomlapolis.com/

Janich

unread,
Dec 28, 2010, 9:52:21 PM12/28/10
to Joomla! Framework Development
This seems to be directly related to bug #23912 too...
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=23912


On 14 Dec., 18:03, Beat <beat...@gmail.com> wrote:
> As it seems pretty serious for Joomla 1.6 RC: Reported as bug here too
> for tracking:
>
> http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEd...
>
> Best Regards,
> Beathttp://www.joomlapolis.com/
> > Beathttp://www.joomlapolis.com/- Skjul tekst i anførselstegn -
>
> - Vis tekst i anførselstegn -
Reply all
Reply to author
Forward
0 new messages