| Project: | Simplenews on register |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
I'm evaluating simplenews_register for a site, and unfortunately, I'm not really satisfied with the workflow of subscriptions confirmation on user registration. Basically, I have two options with current version (I'm going to have five different newsletters):
- Disable confirmation emails. This is completely wrong, because just anybody is then able to subscribe arbitrary email addresses to all five newsletters, by just submitting a fake user registration (assuming that the email is not registered yet). No option for me.
- Enable confirmation emails. In this case, when a new user registers to the site, he gets six (!) emails: The ordinary user registration mail with password and one-time login, plus five confirmation emails for all the newsletters. The new user is then required to click links from all six (!) emails to complete the registration. That's a horrible user experience for newcomers.
So, I propose to add a third option:
- Re-use the user account confirmation. In most cases (I believe) the new user gets a confirmation email anyway (the one with password and one-time login), and confirms the submitted user registration form using that email. Since the subscriptions are in fact a part of that form, it makes sense to consider them confirmed by the same operation as well. The user then gets only just one email, while a confirmation is still required.
Attaching a patch. What it does:
* Adds a new setting to re-use the user account confirmation.
* If that is set, the newly created subscriptions are toggled to inactive on form submission, immediately. This nicely reflects the behavior of user.module, which refuses to even show various pages (i.e. user profile) already, if that user didn't log in yet (anti-spam measure in that case). No newsletters will be sent to the user in this phase.
* On first login of the new user (either name/password, or one-time link; I tested and both works), the subscriptions are toggled back to active. This is in fact the same as Simplenews do when synchronizing subscriptions with user accounts (including the relation to $user->status, as it's for no extra cost and more bulletproof, although not strictly required), but we do it on the first login only. (The active status may be also toggled manually by an admin, as already available on Simplenews admin section.)
* We do nothing of that for users, who were already subscribed before (i.e. as anonymous, if that's allowed), to avoid inactivating their already confirmed subscriptions (on possibly fake user registrations). Note that this only applies to users with at least one subscribed newsletter, because a simple record for the email address with no real subscriptions also exists for a subscription pending confirmation, which we don't want to consider confirmed.
| Attachment | Size |
|---|---|
| reuse-confirmation.patch | 3.72 KB |