addUserToGroup non-functional after J3.6 upgrade

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
cpaschen
Joomla! Intern
Joomla! Intern
Posts: 96
Joined: Mon Apr 10, 2006 3:05 am
Location: St. Paul, MN
Contact:

addUserToGroup non-functional after J3.6 upgrade

Post by cpaschen » Fri Jul 22, 2016 6:18 pm

Does anyone else have any problems after the J3.6 upgrade with the addUserToGroup function?

I have a simple user plugin that uses JUserHelper::addUserToGroup to add a group to a user (on the onUserAfterSave function).

It was working fine prior to the J!3.6 upgrade, but now it just doesn't add the group.
All the rest of the code/logic in the plugin is working fine.

Anyone have any similar experience or have any ideas?
Chris Paschen, Paschen Communications
----
http://www.PaschenCommunications.com - Providing Joomla support since ... before there was Joomla
http://www.CMSUpdate.com - Joomla (and other CMS) news, extension reviews, and general Internet tips and ramblings

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17423
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: addUserToGroup non-functional after J3.6 upgrade

Post by toivo » Sun Jul 31, 2016 11:14 am

There are hardly any differences from 3.5.1 to 3.6.0 in library/joomla/user where the addUserToGroup() helper function and its wrapper reside. You could post the relevant lines from your code here.

This code works all right in both versions:

Code: Select all

		$helper		= new JUserWrapperHelper;
		return $helper->addUserToGroup($user['id'], $testgroup);
Toivo Talikka, Global Moderator


Locked

Return to “Joomla! 3.x Coding”