This patch adda a new option to show subscription information on user registration. Some code cleanup was necessary since _simplenews_subscription_manage() returned the rendered form instead of a form array, which the user hook requires.

CommentFileSizeAuthor
simplenews.module.diff.txt4.11 KBdrumm

Comments

brashquido’s picture

Exactly what I was looking for, thanks for the patch. However, I'm not sure it is working 100% as seemlessly as it could with the user registration form (although it is very close). This is what I have noticed;

1) In the user registration form there is a "subscribe" and an "unsubscribe" button underneath the list of available newsletters. If a user clicks the subscribe button the registration form is submitted prematurely.

2) As newsletter registration in the user sign-up form is treated as an anonymous sign-up, there is a seperate confirmation e-mail sent by SimpleNews in addition to the standard Drupal registration e-mail.

3) If the user has selected the the Newsletters they want to subscribe to during registration and then validated their e-mail via the standard Drupal registration e-mail, they are still not subscribed to those newsletters until they click the validation link in the SimpleNews validation e-mails. It would be good if SimpleNews would not send a seperate validation e-mail if subscribed to during the user registration process, and also that newsletters subscriptions were considered confirmed when the standard Drupal e-mail validation link is clicked.

Other than that, top work :)

brashquido’s picture

Just wondering if there had been any futher work done on this patch?

desm0n’s picture

I'd like to see some developments for the patch also.

sungkhum’s picture

It would be great if this was finalized - I totally want it!

-Nathan

graggrag’s picture

This patch is a worthy venture, but it's not there yet. I tried it against current 4.7 cvs, and it looked promising. However, on user registration, sn fires off two emails per newsletter. If a newsletter is not ticked for Subscribe, the email is for confirmation of Unscribe from the newsletter. Furthermore, it fires off these emails (and performs database updates I suspect) even if the user registration form fails validation.

graggrag’s picture

My apologies, please ignore #5. Tried again on clean data & code base, and no such nonsense occured.

graggrag’s picture

With this patch, the custom page subscription option simplenews_subscription_manager() returns just "Array".

The code path through simplenews_user() is a convoluted nightmare.

Ian Ward’s picture

Has anyone got this working nicely or does it need some more work?

ngstigator’s picture

I've posted a solution here http://drupal.org/node/41745

sutharsan’s picture

Status: Needs review » Closed (duplicate)

Patch available for HEAD at: http://drupal.org/node/76648
You can help by testing the patch.