Hi

I cannot get the auto subscription options to work at all. I'm led to believe that if you set the Newsletter to silent then once the new user logs in they are automatically subscribed to the list.

I have also set the unsubscribe to hidden, which I take to mean that the unsubscribe option won't appear on the users account page.

Neither of these things are happening for me. Once I log in as the new user I can clearly see the subscription options and that I am not subscribed to any Newsletters.

We have a membership type system going on where we would like members to be automatically added to a mailing list upon log in to the website. All accounts are created by one central admin so we don't want users to have the option to unsubscribe as the mailing system is integral to the membership management.

Any ideas where i'm going wrong?

Comments

simon georges’s picture

Hum, it seems you're right :-(. Let me look into it. I'll get back to you asap.

miro_dietiker’s picture

If you rework the code, note that in 6.x-2.x we reimplemented the code for autosubscriptions together with registrations:
Right during the registration we already write the subscribe records with an inactive flag for the user. This gets activated on first login.

This is much more transparent to administrators than delayed subscriptions.

Please consider changing the code that way.

simon georges’s picture

@miro_dietiker, it's exactly the same in 7.x-1.x, but I suspect the Simplenews hidden field is at a different place in the form array, so it's not processed correctly... That should be a small fix, I just have to found its right place ;-)

simon georges’s picture

Status: Active » Needs review
StatusFileSize
new3.03 KB

Ok, it's due to http://drupal.org/node/224333#user_data_change.
Patch from HEAD proposed: instead of dealing with user data, I'm handling hidden values and user-submitted values at the same time (still maintaing the unactive subscription).

@Miro, by the way, completely deleting a user does apparently not delete its subscriptions. I'll check on that later.

simon georges’s picture

Category: support » bug

It's actually a bug.

offthehook’s picture

Many thanks Simon & Miro for looking into this. Have you managed to get it working yet?

simon georges’s picture

Did you try the attached patch ? I'm just waiting for someone to confirm it works before committing it (or just that 1 year and 1 day pass ;-)).

offthehook’s picture

Aha, sorry didn't realise the patch was there for me to test.

I can confirm the patch works, simplenews does now automatically add new users to the newsletter list.

Unfortunately the unsubscribe option is still visible on the user's account page. However, I can hide that with a bit of css magic, so I'm happy - thank you!

simon georges’s picture

Status: Needs review » Needs work

Hmmm, oh, yeah, sorry, I only worked on the signup part. I should fix the whole thing. I'll work on that asap. Thanks for the feedback anyway.

simon georges’s picture

1st patch (in #4) committed to 7.x-1.x-dev.
Now let's deal with subscription removal.

simon georges’s picture

Status: Needs work » Needs review
StatusFileSize
new1.74 KB

I think I found something...
@offthehook, can you try the attached patch ? (I think it still needs work, as the access rights (like administer subscription) can be confusing maybe (giving access to hidden newsletter)).

offthehook’s picture

Many thanks, I applied it but didnt seem to work.

Then i checked my permissions to see if there were any new settings there. i noticed that i had allowed the user role to "subscribe to newsletters". I think that may have been previously on the assumption that if i unchecked that they wouldn't be subscribed to newsletters automatically.

With that permission unchecked the option to manage subscriptions disappears from the user's account page and the auto subscription still works.

Many apologies, I feel I should have spotted this earlier.

simon georges’s picture

Status: Needs review » Fixed

Second patch committed as well.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.