Support

Home Forums Event Espresso Premium Add username and password to registration confirmation email

Add username and password to registration confirmation email

Posted: July 30, 2014 at 2:03 pm


Eric Biboso

July 30, 2014 at 2:03 pm

Is it possible to add a shortcode into the registration confirmation email to send the recipient their username/password after registration?

I have used the code snippet from here: https://gist.github.com/Apina/9596012 to automatically create users upon registration. Now I would just like to create a custom email tag for their username/password if its possible.

thanks


Dean

July 31, 2014 at 4:14 am

Hi,

The function should send out an email to the user containing their username and password.

I’ve updated the Gist to include the WordPress standard way of doing it as well ( wp_new_user_notification ) if you wish to use that.

If you really want to include these details in the EE email, then things get a lot more complicated very quickly.

You would have to edit a core file (not recommended) and also somehow get the user id via an SQL and pull in their email and password (after de-crypting it). Overall, I think this will be much more trouble than it’s worth.


Eric Biboso

July 31, 2014 at 2:13 pm

Thanks Dean

The function is sending out an email that contains the username and password, however my client really wants to reduce the number of emails that get sent out when someone registers for an event. So thats why I’m trying to condense the EE registration confirmation email with the user created email into one.

I am thinking of using your solution here: https://eventespresso.com/topic/custom-question-e-mail-tag/ to use the [question_Form question] and [answer_Form question] tags but also combining it with the function that automatically creates the user/password.

I would add 2 new questions to my registration form, one for username and one for password. Then using those answer tags to display those answers in the EE confirmation email. Then I would customize the create wp user function to use those fields from my form when creating the user. Hope that makes sense but I would like to know if you think that would be a good idea or what you would recommend to achieve this if not.

thanks!


Jonathan Wilson

July 31, 2014 at 4:24 pm

Hi Eric,

Dean’s approach *is* the best one. I don’t recommend asking for the user’s password and storing it in the database as a custom question answer. This could prove to be a security issue, because WordPress encrypts passwords that are setup when registering, but doesn’t for the ones that you will be getting from the user with the custom questions.


Eric Biboso

August 1, 2014 at 10:50 am

ok no problem, glad i asked.

thanks!

The support post ‘Add username and password to registration confirmation email’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso