Support #18432
closedMy Sites showing an old group for the user
0%
Description
A History PhD student, Yisroel Ben-Porat, reports: Under my sites it lists a second site "Foundations of American Literature" that I'd like to leave ( https://commons.gc.cuny.edu/groups/foundations-of-american-literature-english-75000/members), but I don't see any way of doing that. Please advise. Thanks!
I replied: "I cannot see why that is happening - you aren't in the group, nor are you following it. Were you ever in that class? Even if you were, that link you sent doesn't show you.
I will consult with the dev team and will let you know."
I turns out he was in this class in Fall 2018. I think Professor Reynolds just uses the same group each semester but invites current students or he clones the group semester by semester. Either way, it seems membership in the group remains visible to the students but not the prof as group admin. He is not anxious for it to be corrected ASAP.
He writes "NI just noticed it recently when I experimented developing my own website, and I saw it under "My Sites." I tried leaving and unfollowing the group, but it's still showing up under my sites."
Files
Updated by Raymond Hoh over 1 year ago
- Category name set to Group Blogs
- Assignee set to Raymond Hoh
- Target version set to 2.1.10
Hi Marilyn,
I see that Yisroel is a member of the connected groupblog: https://amlit75000.commons.gc.cuny.edu/wp-admin/users.php, which is why Yisroel has the site listed under "My Sites". It is not possible for users to remove themselves manually from the connected groupblog.
However:
I tried leaving and unfollowing the group, but it's still showing up under my sites."
This seems like a bug. If a person leaves a group, I believe we should also be removing the user from the groupblog as well.
I'll look into this tomorrow, but for now, I have manually removed Yisroel from the "Foundations of American Literature" site.
Updated by Boone Gorges over 1 year ago
- Target version changed from 2.1.10 to 2.1.11
Updated by Raymond Hoh over 1 year ago
This seems like a bug. If a person leaves a group, I believe we should also be removing the user from the groupblog as well.
Boone, I'm just looking into this.
In BP Groupblog, when a user leaves a group and that user has a role on the connected groupblog, BP Groupblog currently downgrades the user's role to 'subscriber'
instead of removing the user from the blog outright with remove_user_from_blog()
: https://github.com/boonebgorges/bp-groupblog/blob/683c057757cf46de17e958d0d9fb289bcb64e0d7/bp-groupblog.php#L473 . Do you remember why we decided to downgrade the user's role instead of removing the user from the site?
Updated by Boone Gorges over 1 year ago
Looks like the decision about this behavior was made before our time on the plugin: https://github.com/boonebgorges/bp-groupblog/commit/a13856abe7092e75f984d0141c16f97d494b83ac#diff-f1ad09172f3fb6ec4cc3c58e5f602bb0b8efd39b9be270e3e615f90ae71e685fR645
I think we can safely change it to remove the user from the blog.
Updated by Marilyn Weber over 1 year ago
Thanks to you both! This can be closed.
Updated by Boone Gorges over 1 year ago
Thanks, Marilyn! I'll wait to close the ticket until we've got the upstream fix in place as well.
Ray, I went to make the change, but I wasn't sure how to handle post-reassigning. Presumably we want to pass 0 (remove_user_from_blog( $user_id, $blog_id, 0 );
) so that no reassignment takes place, right?
Updated by Raymond Hoh over 1 year ago
Presumably we want to pass 0 (remove_user_from_blog( $user_id, $blog_id, 0 );) so that no reassignment takes place, right?
Yes, let's pass 0 as we wouldn't want to reassign posts to another user. This would be important for course sites. Do you want me to send a PR to bp-groupblog or do you want to handle that, Boone?
Updated by Boone Gorges over 1 year ago
- Status changed from New to Staged for Production Release
Nope, I've got it :) Fixed in bp-groupblog in https://github.com/boonebgorges/bp-groupblog/commit/1371740d24ba7292ccd7438cb652207394d58518 and ported to the Commons in https://github.com/cuny-academic-commons/cac/commit/3b35f688185c1e0d517ec520b1936a00d589d3cf.
Updated by Boone Gorges over 1 year ago
- Target version changed from 2.1.11 to 2.1.12
Updated by Boone Gorges over 1 year ago
- Target version changed from 2.1.12 to 2.1.11
Updated by Boone Gorges over 1 year ago
- Status changed from Staged for Production Release to Resolved