From 92cd35b5a2957ae70a2c7a6dff7ddff90b2cdfb4 Mon Sep 17 00:00:00 2001 From: westi 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: http://svn.automattic.com/wordpress/trunk@7065 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 06e44fc58..8532cc46a 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 +?>