AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Custom User Registration Email

2 Posts
1 Users
0 Reactions
1,056 Views
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@pfista)
Active Member
Joined: 2 years ago
[#56684]

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

 Screenshot 2024 06 16 at 12.46.42 PM

1 Reply
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@pfista)
Active Member
Joined: 2 years 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
 Versuch 1 code

Reply
Share: