Skip to content
Snippets Groups Projects
Commit 3f9ef7f9 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

V2.0.1: Fix wrong user id for groups loading

parent eccaf4bd
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Joomla Community Builder 2.x User groups Field Type Plugin: plug_cbusergroupsfield * Joomla Community Builder 2.x User groups Field Type Plugin: plug_cbusergroupsfield
* Lets the administrator change the user's joomla groups in the CB profile in the FE. * Lets the administrator change the user's joomla groups in the CB profile in the FE.
* Based on the CBfield_userparams class of the cb.core.php plugin, copyright (C) Beat, JoomlaJoe, www.joomlapolis.com and various * Based on the CBfield_userparams class of the cb.core.php plugin, copyright (C) Beat, JoomlaJoe, www.joomlapolis.com and various
* @version $Id$ * @version 2.0.1
* @package plug_cbusergroupsfield * @package plug_cbusergroupsfield
* @subpackage cb.usergroupsfield.php * @subpackage cb.usergroupsfield.php
* @author Reinhold Kainhofer, Open Tools * @author Reinhold Kainhofer, Open Tools
...@@ -131,7 +131,7 @@ class CBfield_usergroups extends cbFieldHandler { ...@@ -131,7 +131,7 @@ class CBfield_usergroups extends cbFieldHandler {
// This is from CB\Database\Table\UserTable::afterBindFromDatabase, // This is from CB\Database\Table\UserTable::afterBindFromDatabase,
// which is documented as WIP and not adviced to be called directly, // which is documented as WIP and not adviced to be called directly,
// so we duplicate the code here... // so we duplicate the code here...
$gids = array_values( (array) \JFactory::getAcl()->getGroupsByUser( $this->id, false ) ); $gids = array_values( (array) \JFactory::getAcl()->getGroupsByUser( $user->id, false ) );
foreach ( $gids as $k => $v ) { foreach ( $gids as $k => $v ) {
$gids[$k] = (string) $v; $gids[$k] = (string) $v;
} }
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment