Title: [Plugin: RSS Importer] Adding authors &#8211; solution
Last modified: August 20, 2016

---

# [Plugin: RSS Importer] Adding authors – solution

 *  [ollybenson](https://wordpress.org/support/users/ollybenson/)
 * (@ollybenson)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-rss-importer-adding-authors-solution/)
 * Hi,
 * This question has been asked before but I’ve got a solution.
 * Open the rss-importer.php and find the line that says
 * `$post_author = 1`
 * And replace with this code:
 *     ```
       preg_match('|<dc:creator>(.*?)</dc:creator>|is', $post, $get_post_author);
       				$post_author_name = sanitize_user($wpdb->escape( html_entity_decode( trim( $get_post_author[1] ) ) ));
       			$post_author = username_exists( $post_author_name );
       			if (!$post_author) {
       					$random_password = wp_generate_password( $length=12, $include_standard_special_chars=false );
       					$post_author = wp_create_user( $post_author_name, $random_password, $post_author_name."@xxxxxxx.com");
       					}
       ```
   
 * It’ll create a new user for each distinct username passed, with a fake email 
   address.
 * [http://wordpress.org/extend/plugins/rss-importer/](http://wordpress.org/extend/plugins/rss-importer/)

The topic ‘[Plugin: RSS Importer] Adding authors – solution’ is closed to new replies.

 * ![](https://ps.w.org/rss-importer/assets/icon.svg?rev=2828571)
 * [RSS Importer](https://wordpress.org/plugins/rss-importer/)
 * [Support Threads](https://wordpress.org/support/plugin/rss-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/rss-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rss-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rss-importer/reviews/)

## Tags

 * [author](https://wordpress.org/support/topic-tag/author/)

 * 0 replies
 * 1 participant
 * Last reply from: [ollybenson](https://wordpress.org/support/users/ollybenson/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-rss-importer-adding-authors-solution/)
 * Status: not resolved