When WordPress is registered, the email sending password is displayed again.

Source: Internet
Author: User

When registering a user with WordPress, the password is usually sent to the mailbox by email. But in many cases, for example, some servers do not support the mail function. There are also some mailbox problems, network problems, and so on, resulting in failure to send emails.

This section describes how to send an email when registering a user and display the password immediately after registration. After successful registration, the password is displayed.

Two birds in one fell swoop.

After successful registration, the password is displayed.
1. Find the wp-login.php file in the WordPress root directory

2. Find "wp_new_user_notification" and add two lines below

Wp_new_user_notification ($ user_id, $ user_pass );

Setcookie ("u", $ user_login );

Setcookie ("user_pass", $ user_pass); these two rows are used to record the user name and password.

3. Find

Elseif (isset ($ _ Get ['checkemail']) & 'registered' == _ Get ['checkemail'])

$ Errors-> Add ('registered', _ ('registration complete. Please check your e-mail. '), 'message'); changed

Elseif (isset ($ _ Get ['checkemail']) & 'registered' == _ Get ['checkemail'])
$ Errors-> Add ('registered', _ ('Congratulations, registration successful <br/> username/User :'. $ _ cookie ['U']. '<br/> password & nbsp; Code/password :'. $ _ cookie ['user _ pass']. '<br/> (change the password to a password that is easy to remember after logon )'));~ Complete.

PS: if the package contains Chinese characters, as shown above. Save it as utf8 format.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.