Members receiving email notifications from groups they've left
One unintended result of the way that I transferred old subscription settings to the new ones is that members who had once been a member of a given group but had since left it were subscribed to emails in that group. That is a function of the fact that the old plugin was sloppy about removing that data from the system when someone left a group. I probably should have checked against current group membership instead of using only those old settings as a data point, but what's done is done.
My plan is to write another script that loads the subscription data for each group and checks it against the membership rolls. If a subscribed user is not currently a member of the group, he will have his subscription removed.
NB this is probably not a problem for that many people, as I would imagine that few people have left as many groups as I have (for testing, etc).
#4 Updated by Boone Gorges almost 11 years ago
I just wrote a little script to detect this, and the good news is that, on my local installation (and a several-months-out-of-date database) there are only a dozen or so instances of the problem. So we're probably not looking at something huge.
In any case, it will be fixed with 1.1.1.
#5 Updated by Boone Gorges almost 11 years ago
Ron or Chris, if one of you could take 5 minutes to glance at it and make sure that nothing insane is happening, I'd appreciate it :)
#8 Updated by Chris Stein almost 11 years ago
I don't have time to try running this but looking over it the logic seems OK to me. I also don't know much about how the group member and group meta tables are so could only look at the general logic there.
I don't know if this will be an issue or not but it appears that when you use unset() on arrays it doesn't alter the indexes for the items in the array so they can be messed up. In the comments on this php.net page is where I saw it.
Look for the comment
j dot vd dot merwe at enovision dot net
I'm guessing that would only be a problem if you wanted to loop back through the array again but you can do what that person has and add something like
$subs = array_values($subs);
to reset the indexes.