Project

General

Profile

Actions

Support #18432

closed

My Sites showing an old group for the user

Added by Marilyn Weber 10 months ago. Updated 9 months ago.

Status:
Resolved
Priority name:
Low
Assignee:
Category name:
Group Blogs
Target version:
Start date:
2023-07-07
Due date:
% Done:

0%

Estimated time:
Deployment actions:

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

Actions #1

Updated by Raymond Hoh 10 months 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.

Actions #2

Updated by Boone Gorges 10 months ago

  • Target version changed from 2.1.10 to 2.1.11
Actions #3

Updated by Raymond Hoh 10 months 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?

Actions #4

Updated by Boone Gorges 10 months 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.

Actions #5

Updated by Marilyn Weber 10 months ago

Thanks to you both! This can be closed.

Actions #6

Updated by Boone Gorges 10 months 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?

Actions #7

Updated by Raymond Hoh 10 months 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?

Actions #8

Updated by Boone Gorges 10 months ago

  • Status changed from New to Staged for Production Release
Actions #9

Updated by Boone Gorges 9 months ago

  • Target version changed from 2.1.11 to 2.1.12
Actions #10

Updated by Boone Gorges 9 months ago

  • Target version changed from 2.1.12 to 2.1.11
Actions #11

Updated by Boone Gorges 9 months ago

  • Status changed from Staged for Production Release to Resolved
Actions

Also available in: Atom PDF