mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
Pluggable random password generator from pishmishy. fixes #5401
git-svn-id: https://develop.svn.wordpress.org/trunk@6385 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -224,7 +224,7 @@ function populate_options() {
|
||||
}
|
||||
|
||||
// 2.0.3
|
||||
add_option('secret', md5(uniqid(microtime())));
|
||||
add_option('secret', wp_generate_password());
|
||||
|
||||
// 2.1
|
||||
add_option('blog_public', '1');
|
||||
|
||||
@@ -35,7 +35,7 @@ function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='
|
||||
// being shared among blogs. Just set the role in that case.
|
||||
$user_id = username_exists($user_name);
|
||||
if ( !$user_id ) {
|
||||
$random_password = substr(md5(uniqid(microtime())), 0, 6);
|
||||
$random_password = wp_generate_password();
|
||||
$user_id = wp_create_user($user_name, $random_password, $user_email);
|
||||
} else {
|
||||
$random_password = __('User already exists. Password inherited.');
|
||||
|
||||
Reference in New Issue
Block a user