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
This commit is contained in:
Peter Westwood
2008-02-27 18:45:40 +00:00
parent fdb0fcbafe
commit b76a914593
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -161,7 +161,7 @@ class WP_Import {
$user_id = username_exists($new_author_name);
if ( !$user_id ) {
$user_id = wp_create_user($new_author_name, 'changeme');
$user_id = wp_create_user($new_author_name, wp_generate_password());
}
$this->author_ids[$in_author_name] = $user_id;
@@ -181,7 +181,7 @@ class WP_Import {
<p><?php _e('To make it easier for you to edit and save the imported posts and drafts, you may want to change the name of the author of the posts. For example, you may want to import all the entries as <code>admin</code>s entries.'); ?></p>
<?php
if ( $this->allow_create_users() ) {
echo '<p>'.__('If a new user is created by WordPress, the password will be set, by default, to "changeme". Quite suggestive, eh? ;)')."</p>\n";
echo '<p>'.__('If a new user is created by WordPress, a password will be randomly generated. Manually change the user\'s details if necessary.')."</p>\n";
}
@@ -742,4 +742,4 @@ $wp_import = new WP_Import();
register_importer('wordpress', 'WordPress', __('Import <strong>posts, comments, custom fields, pages, and categories</strong> from a WordPress export file'), array ($wp_import, 'dispatch'));
?>
?>