Page 1 of 1

Sign up confirmation email hook

PostPosted: May 27th, 2011, 6:43 pm
by totomobile
Hey guys, sorry to bother you again, I just noticed that the 1.6 release is right around the corner so you guys must be pretty busy (can't wait for that) ... but I have 1 more question to ask you:

My client is using pro forms in the registration process. We've also got Buddypress messaging setup and would like to send the Sign up confirmation email (s2->paypal options -> sign up confirmation email (pro)) to the user's buddypress message box.

I looked through paypal-notify.inc.php but there are so many filter hooks it's confusing which one I should use. Ideally I'd like a filter which sends me the processed email (with the %% fields already replaced) and I can just manually add this to their bp message box. an action would also work as we can just send them at least a welcome message. In fact any hook will do which is a confirmation of the sign up process (level1) being successful.


:)
thanks
T

Re: Sign up confirmation email hook

PostPosted: May 28th, 2011, 1:51 am
by Cristián Lávaque
Hi Toto.

Well, the Notification API seems good to use for this. Try the Registration one for any new account, or Sign Up one for paid ones. This video may help http://www.s2member.com/api-tracking-no ... ons-video/

Re: Sign up confirmation email hook

PostPosted: May 31st, 2011, 6:39 pm
by totomobile
Hi Christian, thanks for your reply here. I in fact did implement a script using the Notification API and it works great. The only issue is that the Registration Notification will send the %%user_id%%, while the Sign Up notification will not. I need this ID because that is how I know who to send a message to. I could do a reverse lookup of the database and such through emails and names but it is not a clean way to implement the code.

I understand you can't send the %%user_id%% through the Sign Up Notification because the user may not actually have an ID at that point, however, if a user exists in the site and they are already a free subscriber and they go to upgrade to a level 1 membership, then the Sign Up Notification will fire and the user WILL have a %%user_id%% so maybe it can be made available in that case..somehow .. do you think that might work?

thanks
T

Re: Sign up confirmation email hook

PostPosted: May 31st, 2011, 9:48 pm
by Cristián Lávaque
Have you tried passing the username as a custom value?

Re: Sign up confirmation email hook

PostPosted: June 1st, 2011, 12:15 pm
by totomobile
Well this is a good point, but the username is also not available for the sign up notification! However, since this is part of the sign up form it could be made available. The user id and the username are the only 2 uniquely enforced fields in the user table as far as I know, so either one would work to identify the user with the notification callback.

Thanks
T

Re: Sign up confirmation email hook

PostPosted: June 1st, 2011, 3:13 pm
by Cristián Lávaque
No problem. :)