Two odd issues with my profile:
1) My contact form got mysteriously enabled. This is the second time this is happened. As most know, I've had my contact form disabled for years because I can't handle the flood in my personal inbox. When I edited my account, the box was checked. I unchecked it and it appeared to save, so this might be a hard one to understand what happened. There's a very very small chance that it is user error and that I somehow re-enabled it when I edited my profile a few days ago, but I am fairly sure I did not check that box when I did.
2) I an unable to uncheck the "Drupalcon news" checkbox. I uncheck it, hit save, and it's checked again. If it's a newsletter that can't be unsubscribed from, it shouldn't appear in the list.
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | 2451449.diff | 2.33 KB | drumm |
Comments
Comment #1
drummYou certainly should be able to unsubscribe from all mailing lists. I'll see if I can figure anything out.
Comment #2
drummI deleted your subscription manually from MailChimp's admin. I can unsubscribe myself via my Drupal.org profile. And you were still listed as subscribed despite unsubscribing via a link in email a few weeks ago. Unless others have this issue, I'm thinking this could be some quirk in MailChimp.
Comment #3
drummIf I run
user_save(user_load(26979)), that checks Personal contact form. We occasionally do that to pro-actively bakery sync. This seems like a potential Drupal core issue.Comment #4
drummYep, this looks like it is too aggressively reverts to the default:
Setting to major since this isa data loss bug that allows unwanted email to be sent.
Comment #5
drummHere is a quick patch. Still needs testing for new user creation. And probably needs tests.
Comment #6
drummMy reading of the D8 code makes this look fixed in D8.
Comment #7
drummHere are some tests.
Comment #10
drummThe test-only patch failed where expected. Let's try this for the full patch.
Comment #12
drummRewrote this to use the old category system.
Comment #14
drummOf course,
$this->contact_userin the test will be a stale object. Adding inso that it can be cleanly be saved.
I'm sticking with checking
$categoryin the module, that's the most authentic Drupal 7 way.Comment #15
drummComment #16
drumm… that should be
Comment #21
drummAnother try without overwriting
$this->contact_user.Comment #24
drummGoing back to my original patch from #5, with the working tests in #21.
Comment #25
drummMy approach in #12 had failed because the default value for
$categoryis'account'. I think this approach is solid.Comment #26
stefan.r commentedComment #27
polLooking good to me.
Comment #28
David_Rothstein commentedCommitted to 7.x - thanks!
I think this was tagged for Drupal 7.60 under the assumption that that would be the next (non-security) release. Since it isn't, I'm just going ahead and committing it now for Drupal 7.55. It looks like a nice, self-contained fix.