From:
Http://www.v2op.com/blog/2008/08/wordpress%E6%B3%A8%E5%86%8C%E7%9B%B4%E6%8E%A5%E6%98%BE%E7%A4%BA%E5%AF%86%E7%A0%81/
The user registration mechanism of WordPress is to enter the user name and email address. WordPress generates a random password and sends it to the email address entered during user registration. However, many people do not configure the mail service (such as the server I am using) on their servers, or because of the anti-spam function of the mail service provider, as a result, the password email sent by WordPress cannot be received after registration, and registration cannot be completed.
Inconvenient...
In this case, it is better to hacks WordPress. So that no email is sent during WordPress registration, and the password is displayed directly.
How to change it? Very simple, just change the wp-login.php under the WordPress root directory.
1. Search for the following sentence in the register_new_user function. Used to send notifications after successful registration. Comment it out.
wp_new_user_notification($user_id, $user_pass);
2. Add two sentences in the next line of the above sentence:
setcookie("u", $user_login);
setcookie("user_pass", $user_pass);
The purpose is to write the username entered during registration and the password randomly generated by WordPress into cookies so that they can be called later.
3. Search for the following sentence
$errors->add('registered', __('Registration complete. Please check your e-mail.'), 'message');
And replace it
$ Errors-> Add ('registered', _ ('^__^ registered successfully! User name :'. $ _ cookie ["U"]. 'password :'. $ _ cookie ["user_pass"]. '(you can change the password to a password that is easy to remember after logon)'), 'message ');
At this point, the modification is complete. Save and upload.
Note: This article is based on WordPress 2.6.1. I didn't see any other versions, so there should be no major changes.