From b76a914593f6a34fd99b05203591397073b561ea Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Wed, 27 Feb 2008 18:45:40 +0000 Subject: [PATCH] Generate random passwords for users created during import. Fixes #5837 props pishmishy. git-svn-id: https://develop.svn.wordpress.org/trunk@7065 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/import/mt.php | 4 ++-- wp-admin/import/wordpress.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-admin/import/mt.php b/wp-admin/import/mt.php index 06e44fc586..8532cc46a0 100644 --- a/wp-admin/import/mt.php +++ b/wp-admin/import/mt.php @@ -61,7 +61,7 @@ class MT_Import { function checkauthor($author) { global $wpdb; //mtnames is an array with the names in the mt import file - $pass = 'changeme'; + $pass = wp_generate_password(); if (!(in_array($author, $this->mtnames))) { //a new mt author name is found ++ $this->j; $this->mtnames[$this->j] = $author; //add that new mt author name to an array @@ -153,7 +153,7 @@ class MT_Import {

italics. For each of these names, you can either pick an author in your WordPress installation from the menu, or enter a name for the author in the textbox.'); ?>

-

+

author_ids[$in_author_name] = $user_id; @@ -181,7 +181,7 @@ class WP_Import {

admins entries.'); ?>

allow_create_users() ) { - echo '

'.__('If a new user is created by WordPress, the password will be set, by default, to "changeme". Quite suggestive, eh? ;)')."

\n"; + echo '

'.__('If a new user is created by WordPress, a password will be randomly generated. Manually change the user\'s details if necessary.')."

\n"; } @@ -742,4 +742,4 @@ $wp_import = new WP_Import(); register_importer('wordpress', 'WordPress', __('Import posts, comments, custom fields, pages, and categories from a WordPress export file'), array ($wp_import, 'dispatch')); -?> \ No newline at end of file +?>