Opened 15 years ago
Closed 15 years ago
#2222 closed defect (bug) (fixed)
Double membership bug
Reported by: | 3sixty | Owned by: | |
---|---|---|---|
Milestone: | 1.2.4 | Priority: | major |
Severity: | Version: | ||
Component: | Groups | Keywords: | has-patch, needs-testing |
Cc: | 3sixty, boonebgorges |
Description
A member of a private Group somehow has TWO entries for his name in the group's Members list. I asked him how this happened. He wrote back:
"I think you invited me to join. Then when I went to the page, the invitation wasn’t there, so I requested membership. Before you accepted my request, I realized that I could accept your original invitation by following the link from the e-mail. Then you accepted my request to join."
This user is still on the memberlist twice if you want to see the install.
Attachments (1)
Change History (8)
#4
@
15 years ago
I've confirmed this bug too.
Right now groups_invite_user checks for duplicate invitations, and groups_send_membership_request checks for duplicate requests, but they don't reference each other at all, which results in two entries in the group members table.
There are a few ways to handle it:
1) Don't let an invite (memb request) be sent if a membership request (invite) already exists. Send an error back to the inviter that says "x has already requested membership" (in the case of invitations) or back to the requester that says "You've already been invited" (in the case of membership requests).
2) When you have both a membership request and an invitation, have the member join the group. The logic: an invitation to join a group is more or less equivalent, at least from a privacy point of view, to the approval of a request. The problem is that it might be a bit confusing to request membership and then all of a sudden find yourself joined. Also, only admins can approve requests, while any group member can send invites - so I guess they're not exactly alike.
3) Allow invites and requests for a user/group pair to coexist, but make sure that the other one is cleared when the invitation is accepted/the notification is approved, so that you don't get the problem of double membership.
I guess (3) seems the most natural to me.
Also reported more recently in http://trac.buddypress.org/ticket/2284 by markshafer