| User | Post |
|
7:25 am February 1, 2012
| metal450
Member
| | | |
|
| posts 178 |
|
|
Hey Kevin,
I found a bit of an issue with role caching. Consider an existing user who is not a member of a group. That user then performs some action (in my case, connecting their WP account with Facebook) which adds them to a group via the function ScoperAdminLib::add_group_user($groupid, $userid). After that point, the user is in some places identified as a member of the group and in some places not - until I manually flush the role cache via the admin panel.
Example: When viewing "All Users" in the admin panel, the Groups column does show them as a member of that group. However, if I then edit the user, the "Active Groups" selectbox DOES NOT show them as a member of that group. Likewise, the user does not have access to posts/pages to which group membership should entitle them.
I did see that there's already a call to flush_groups_cache_for_user() at the end of that function, so presumably something else needs to be flushed but isn't.
Note that I'm still using 1.3.44.
|
|
|
12:11 pm February 10, 2012
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
For now, just replace the contents of function flush_groups_cache_for_user with the following:
wpp_cache_flush();
|
|
|
8:22 pm February 10, 2012
| metal450
Member
| | | |
|
| posts 178 |
|
|
Will this be fixed in 1.3.55? Will it have a significant performance impact on whenever that function is called to add a new user to a group?
|
|
|
8:00 am February 13, 2012
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
metal450 said:
Will this be fixed in 1.3.55?
Yes
Will it have a significant performance impact on whenever that function is called to add a new user to a group?
No, it just deletes several files. There is no "rebuild index" type of processing overhead. The moderate performance impact is on each user's subsequent next site access. There will be more queries prior to their cache being rebuilt.
|
|
|
8:37 am February 13, 2012
| metal450
Member
| | | |
|
| posts 178 |
|
|
Great, thanks - sounds good
|
|