This bug is not easy to reproduce, because it seems to be random at first. Best way to reproduce is have a user assigned to all the ACL grops in Joomla, and then open a few tabs in rapid succession with a subpage that performs a save on the user object.
No #__user_usergroup_map records get lost
User gets unsassigned from groups. If JTable::store() happens on the same user concurrently, it will eventually lead to loss of #__user_usergroup_map rows for that user. Because JTable::store() deletes everything from #__user_usergroup_map and then re-adds one by one, if that process happens multiple times in parallel for the same user, the inserts and deletes get mixed up.
Joomla 3.3.3
// TODO: This is a dumb way to handle the groups.
Among JomSocial developers issues caused by this implementation are known as "the bug from hell" that lead to users randomly losing priviledges on a dozen or so websites, it took us qite a while to nail it.
I wrote a fix for this, that instead of performing "delete and re-insert one by one", grabs the records from the database, loops through them, decides which should stay and which should go based on $this->groups and then adds new ones (if any) from $this->groups
@jaworskimatt if you need help for the pull request please have a look into this doc page: http://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5138.
@Bakual @zero-24 pull request created
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5138.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-11-20 07:28:07 |
Labels |
Added:
?
|
Can you create a Pull Request since you already propose a solution? Then it can be tested.