Skip to content

Commit

Permalink
Use JUser::getInstance
Browse files Browse the repository at this point in the history
This removes half of the JSession dependency in the method.
  • Loading branch information
wilsonge committed Oct 7, 2014
1 parent 73c13e6 commit 0a6b354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/joomla/user/helper.php
Expand Up @@ -65,7 +65,7 @@ public static function addUserToGroup($userId, $groupId)
if (JFactory::getSession()->getId())
{
// Set the group data for any preloaded user objects.
$temp = JFactory::getUser((int) $userId);
$temp = JUser::getInstance((int) $userId);
$temp->groups = $user->groups;

// Set the group data for the user object in the session.
Expand Down

0 comments on commit 0a6b354

Please sign in to comment.