Notifications
Clear all

Custom User Registration Email

2 Posts
1 Users
0 Reactions
196 Views
Posts: 11
Topic starter
(@pfista)
Active Member
Joined: 5 months ago

Hello Everyone,

 

I searched for quite some time now but I can't find a solution for this.

I wanted to make custom Emails for new users with the password-set link with a Codesnipped.

I found a page from codewp which shows how you can do this. I tried everything. The email itself is working fine. The only thing I can't get through is the link to set the password. I came to the point where I got to the password set page and in the link, the right username was displayed but however, the key was empty. 

The Screenshot of the template is attached.

I changed the following:

$message .= "<a $link_style href='" . wpforo_home_url( "?wpfaction=resetpassword_form&rp_key=$user->user_activation_key&login=" . rawurlencode( $user->user_login ), 'login' ) . "'>" . __( 'Set Your Password' ) . "</a>";

 

I really want to get this thing to work. Perhaps it's only a small issue but I'm too unfamiliar with this whole coding and can't find it myself.

 

Is someone here, who did this himself or can help me out?

I'm sorry, if I'm in the wrong forum but this is the one I'm hopeful that someone can help me.

 

Thanks a lot in advance

Markus

1 Reply
Posts: 11
Topic starter
(@pfista)
Active Member
Joined: 5 months ago

Hi, me again,

 

so I tested a little bit further but I can't find a thing how I can get to the solution.

When i do the same for the activation key as they do to get the user_login in the template, nothing is inserted.

https://unternehmer-forum.com/change-password/?wpforo=resetpassword&rp_key=

Code looks like this:

$message .= "<a$link_stylehref='" . network_site_url( "change-password/?wpforo=resetpassword&rp_key=". rawurlencode( $user->user_activation_key ), 'key'."&login=" . rawurlencode( $user->user_login ), 'login' ) . "'>" . __( 'Set Your Password' ) . "</a>";
 
 
 
However when I paste the sample 1:1 (except for the url, because I don't use the wp login) I get the username but not the activation key.

https://unternehmer-forum.com/change-password/?wpforo=resetpassword&rp_key=rp&key=&login=Test

 

Code looks like this:

$message .= "<a$link_stylehref='" . network_site_url( "change-password/?wpforo=resetpassword&rp_key=rp&key=$user->user_activation_key&login=" . rawurlencode( $user->user_login ), 'login')."'>" . __( 'Set Your Password' ) . "</a>";
 
If anyone can help or has ideas how to solve this, please help. I'm happy about all advices.
 
Best Regards,
Markus
Reply