Membership/Buddypress no activation email

Greetings folks,

I've got Membership installed in a WPMU/Buddypress environment (WP 3.3.1, BP 1.5.4, Membership 3.0, WPML 1.3.0). At the moment I only have the free subscription level active, and registration seems to work as expected. However, the activation email isn't sent out at all.

I've scoured the internets for others with this problem, and they all seem to point to SMTP config issues. I'm pretty sure this isn't an SMTP/server config for 2 reasons: 1) I don't see any trace of an email even attempted to the recipient in Postfix logs 2) Other notifications (friendship requests, messages, etc.) all get sent out as expected. I don't see anything in my error logs, either. I'm going to change the log levels to NOTICE for a bit and see if that turns up anything suspicious (and I'll report back here if it does).

Is anyone else seeing this behaviour? Any help on this would be much appreciated. I find Membership is a great plugin, and just that alone makes my WPMUDEV subscription worthwhile (let alone some of the other great plugins I got from here) - you have saved me weeks of programming time. Thanks!

  • cmurtagh
    • WPMU DEV Initiate

    Ok, I think I've found what might be the problem, or at least I see something *very* suspicious in the code.
    In membershipincludes/classes/membershippublic.php on lines 1427 and 1302 there is a very dubious looking 'exit;'. Right after both of these is where the wp_new_user_notification() calls are, so it's no surprise that the user doesn't get these.

    Not surprisingly, once I removed those two 'exit;' statements, email notification worked. My guess that these were put in there temporarily for dev/debugging and had forgotten to be taken out.

    This is only an email notification though (username and password). Is it possible to have user validation via this? So that the user goes from an inactive -> active state only once they've clicked on a validation link in email?

  • aecnu
    • WP Unicorn

    Greetings cmurtagh,

    Thanks again for you valuable feedback and for pointing out this anomaly in our Membership plugin.

    I will notify the lead developer of this too as with the captcha problem from the other ticket.

    As you may have noticed this is an RC version and yes it is true that our lead developer was working very hard to rewrite this program and to make it better then it used to be by far which he has obviously done as most members who were using the old version show elation with the new one.

    Obviously there are a couple of bugs in which you have been instrumental in pointing out and debugging them as well.

    Some rep points sent your way with a big thank you.

    Cheers, Joe

  • Barry
    • DEV MAN’s Mascot

    However, the activation email isn't sent out at all.

    If registering via the membership registration form, then you are correct there are no activation emails sent - primarily because the next step is for the user to pay for a subscription, and unless a user account is created then the payment and subscription doesn't have a user to link to. So it is by design that the activation email is removed.

  • Barry
    • DEV MAN’s Mascot

    Ah, right - reading again - will look at the notification issue:

    This is only an email notification though (username and password). Is it possible to have user validation via this? So that the user goes from an inactive -> active state only once they've clicked on a validation link in email?

    No, for the reason in the post above. The user goes from de-activated to activated on successful payment / assignment of a subscription.

  • cmurtagh
    • WPMU DEV Initiate

    Yeah, sorry if my ramblings weren't so clear. I've basically just done a soft launch of my site, and at the moment I only have the free subscription level. So they register, and by default are assigned that. I plan on adding the paid subscriptions at a later date, but would still like to have them validate/activate their account. Is there a better way for me to do this?

    Thanks for the speedy response on the weekend.

  • Barry
    • DEV MAN’s Mascot

    I plan on adding the paid subscriptions at a later date, but would still like to have them validate/activate their account. Is there a better way for me to do this?

    Not really, the account needs to exist before the subscription can be assigned - forcing the user to leave the site to check their email, click a link to create their account and then come back to the site means you lose the flow of the signup, you could add captcha to the registration form if you are bothered about spam accounts being created - but I'll make a note in our todo list and see if we can work out a method of implementing it neatly.

  • cmurtagh
    • WPMU DEV Initiate

    I agree that forcing the user to leave the site is not conducive to a great flow. It would certainly be nice to know if their email address is valid though (and clearly with the free web hosting like Yahoo!/GMail/Hotmail, etc. it's not a huge barrier for spammers either). For now, I'll just check the 'Enable incomplete signup accounts ' option, and keep an eye on it.

    Thanks again.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.