Bug #6009
closedFrom name on new user notification to site admin has the wrong site name
0%
Description
Matt reports that he got an email that looked like the following:
From: *Class Site for Fall 2016 MALS 73100* <commons@gc.cuny.edu <mailto:commons@gc.cuny.edu>> Date: Mon, Sep 5, 2016 at 10:04 PM Subject: New User Registration: vgandolf To: cunycommons@gmail.com <mailto:cunycommons@gmail.com> New User: xxxxxxxx Remote IP: 24.188.177.77 Disable these notifications: https://commons.gc.cuny.edu/wp-admin/network/settings.php <https://commons.gc.cuny.edu/wp-admin/network/settings.php>
The issue here is that the from name appears to be the name of a site other than the root blog (http://16amstud.commons.gc.cuny.edu/, if I'm understanding correctly).
The user (which I've xxxxed out for privacy - the real ID is 7966 if you want to look it up) doesn't appear to be a member of the 16amstud site, and in fact doesn't appear to have any actual BuddyPress activity.
I've tried a half-dozen different paths to try to figure out what might be going on here, but I've had zero luck. Ray, any ideas?
Updated by Raymond Hoh about 8 years ago
From the issue description, there are two issues:
1. Email "From" name is using the sub-site's name instead of our custom "CUNY Academic Commons" name
This is kind of an edge case, but from what I could gather from the code base, the only time the sub-site's name would be used is if WP Cron is running at the same time when the user was being registered:
https://github.com/cuny-academic-commons/cac/blob/master/wp-content/mu-plugins/cac-functions.php#L280
I haven't been able to duplicate this locally.
2. vgandolf user doesn't exist on the "16amstud" sub-site
My only guess here is since the sub-site is set up to use the I would like my site to be visible only to users I add to it
site visibility option (via the More Privacy Options plugin), that the admin added the vgandolf user and later removed the user from the sub-site.
We could probably confirm with the sub-site's admin to verify if this is the case or not.
Updated by Boone Gorges about 8 years ago
- Status changed from Assigned to Rejected
This is kind of an edge case, but from what I could gather from the code base, the only time the sub-site's name would be used is if WP Cron is running at the same time when the user was being registered:
Oh, crazy. But I don't really see how this could happen. Registration emails ought always to come from the site where registration takes place, which should always be 1 on our configuration. So even if cron was taking place on another site, it'd be in a separate process.
My only guess here is since the sub-site is set up to use the I would like my site to be visible only to users I add to it site visibility option (via the More Privacy Options plugin), that the admin added the vgandolf user and later removed the user from the sub-site.
It could be that this is unrelated. If the email header was replaced by a fluke as you suggest above, then it's likely that the user is totally unrelated to that specific site.
I guess I'm leaning toward filing this one away unless it comes up again, at which point we can try building a debugging tool to catch these issues and capture a backtrace.
Updated by Boone Gorges about 8 years ago
I found the issue. It dawned on me that perhaps the users had been activated, rather than created, on the site in question. It turns out that they had: via the Unconfirmed plugin, which was available to all users for a short period of time. (See #6000.) I looked in the logs and found requests to an Unconfirmed URL, which contained activation keys (used by the plugin to show success/error messages). I cross-referenced the keys with the keys in the signups table, and they matched the users in the listed emails.
Since this issue is resolved by #6000, I don't think there's anything else to do here.
Updated by Matt Gold about 8 years ago
WOW. Great work tracking this down!! Thank you, Boone. Can we mark it resolved rather than rejected? Rejected makes it seem like you did no work on this!!!