? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
26 Mar 2018

Pull Request for Issue # .

Issue reported by user on forum https://forum.joomla.org/viewtopic.php?f=708&t=960491.

Summary of Changes

User group array contains group IDs as keys but new user group uses title instead. This causes an issue when title is numeric as it can overwrite other keys.

Additionally, this fixes an error when using "0" as user group title.

Testing Instructions

Create an user assigned to group with ID 2 (that would be "Registered" group on fresh installation).
Create user groups titled "2" and "0".
Use JUserHelper::addUserToGroup($userId, $groupId); to add user to newly created groups:
a) group "2";
b) group "0".

Expected result

a) User is added to user group titled "2".
b) User is added to user group titled "0".

Actual result

a) User is added to user group titled "2" but also removed from user group with ID 2 ("Registered").
b) "Access Usergroup Invalid" error.

Documentation Changes Required

Probably not.

avatar SharkyKZ SharkyKZ - open - 26 Mar 2018
avatar SharkyKZ SharkyKZ - change - 26 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Mar 2018
Category Libraries
avatar SharkyKZ SharkyKZ - change - 26 Mar 2018
Title
User group fix when user group title is a number.
Fix for adding user to user group when user group title is a number.
avatar SharkyKZ SharkyKZ - edited - 26 Mar 2018
avatar Quy
Quy - comment - 5 Apr 2018

Missing/unknown repository.

avatar SharkyKZ
SharkyKZ - comment - 5 Apr 2018

@Quy is this causing some issues? Should I re-submit this with valid repo?

avatar mbabker
mbabker - comment - 5 Apr 2018

It breaks com_patchtester because the GitHub API can't be read to pull the PR's contents. Otherwise, no, it's not causing issues for now.

avatar SharkyKZ
SharkyKZ - comment - 5 Apr 2018

OK, I'll resubmit.

avatar SharkyKZ SharkyKZ - change - 5 Apr 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-04-05 20:25:22
Closed_By SharkyKZ
Labels Added: ?
avatar SharkyKZ SharkyKZ - close - 5 Apr 2018

Add a Comment

Login with GitHub to post a comment