<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The McKenzie&#039;s Blog... &#187; PHP</title>
	<atom:link href="http://www.uk-experience.com/category/internet/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.uk-experience.com</link>
	<description>Our life in the UK...</description>
	<lastBuildDate>Fri, 23 Jul 2010 20:57:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress Mass Account Import</title>
		<link>http://www.uk-experience.com/2009/01/26/wordpress-mass-account-import/</link>
		<comments>http://www.uk-experience.com/2009/01/26/wordpress-mass-account-import/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 21:13:36 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[web fun]]></category>

		<guid isPermaLink="false">http://www.uk-experience.com/2009/01/26/wordpress-mass-account-import/</guid>
		<description><![CDATA[While working on a couple of WordPress projects for two sites I host (www.cambridgerepeaters.net &#38; www.cambridgeshire-raynet.net) I had the need to do mass account creation.  These were 30+ accounts at a time, not a thrilling prospect to do that via the normal admin interface.  Searching the net was nearly useless, until I found a WP [...]]]></description>
			<content:encoded><![CDATA[<p>While working on a couple of <a href="http://www.wordpress.org" target="_blank">WordPress</a> projects for two sites I host (<a href="http://www.cambridgerepeaters.net" target="_blank">www.cambridgerepeaters.net</a> &amp; <a href="http://www.cambridgeshire-raynet.net" target="_blank">www.cambridgeshire-raynet.net</a>) I had the need to do mass account creation.  These were 30+ accounts at a time, not a thrilling prospect to do that via the normal admin interface.  Searching the net was nearly useless, until I found a WP plugin called <a href="http://www.dagondesign.com/articles/import-users-plugin-for-wordpress/" target="_blank">&#8220;Import Users Plugin for WordPress&#8221;</a>.  This worked, but was very simple and didn&#8217;t suit my needs.</p>
<p>So, after looking at the script and figuring out how it worked (I&#8217;m not PHP coder but I can get by in a pinch), I managed to hack the script to do what I wanted.  The script as provided above only allows for the email address and login name, the 2 required bits of info to create a new account on a WP system.  However, I needed to be able to specify:</p>
<ul>
<li>first name</li>
<li>last name</li>
<li>password</li>
</ul>
<p>Another nice thing to have on the import is being able to set the WordPress user role (access level), so I shoved that in as well.  On the plugin page I posted a comment about my updates and a link to the new modified script:</p>
<blockquote>
<div class="comment-right">
<p>I’d like to submit another modified version of this great script. The changes I’ve made to the script allows for adding first and last names, setting a password and setting the role for the imports. I’m also using the more powerful method of account creation, “wp_insert_user” this allows a lot more in the way of adding nice things to the script and new account.</p>
<p>The import file or manually entered format is:</p>
<p>username|firstname|lastname|password|email|role</p>
<p>All fields except username and email are optional, but all fields must be delimited, ie:</p>
<p>fred|Fred|Rivers|mypassw0rd|fred@rivers.com|Editor<br />
sam|Sam||sam@mypress.com|</p>
<p>Fred has everything assigned while Sam will be emailed his generated password and his role will be set to whatever was selected from the drop down box on the form.</p>
<p>I’d be interested in any comments on my changes. There have been quite a few changes, I suggest a diff of mine and the latest modified one.</p>
<p>My modified version can be found at:</p>
<p><span style="text-decoration: underline;"><span style="color: #0000ff;"><a rel="nofollow" href="http://www.uk-experience.com/scripts/dd-import-users-mod_wp27.txt">http://www.uk-experience.com/scripts/dd-import-users-mod_wp27.txt</a></span></span></div>
</blockquote>
<p><span style="color: #555555;">I hope people find this useful, I think it&#8217;s a function that&#8217;s needed by far more people then you might expect.  In my mind, it&#8217;s something that should be part of the core code for WordPress.  I can see more modifications coming to this script as my projects progress.  While looking into changes for the script I&#8217;ve found other things that would be nice to have at the time of import too&#8230; </span></p>
<p><span style="color: #555555;">Watch this space&#8230;</span><br />
<strong>Updated script</strong></p>
<p><strong>2009.06.17 @ 2013GMT<br />
</strong></p>
<p>Version 1.1.13 &#8211; Added user URL to be imported into user details (not the default assigned blog for WPMU)</p>
<p><a title="dd-import-users-mod_wp27_v1.1.13.txt" href="http://www.uk-experience.com/scripts/dd-import-users-mod_wp27_v1.1.13.txt">dd-import-users-mod_wp27_v1.1.13.txt</a></p>
<blockquote><p><strong>Note the new format when using this version:</strong></p>
<p>The import file or manually entered format is:</p>
<p>username|firstname|lastname|password|email|role|URL</p>
<p>All fields except username and email are optional, but all fields must be delimited, ie:</p>
<p>fred|Fred|Rivers|mypassw0rd|fred@rivers.com|Editor|http://blah.com<br />
sam|Sam||sam@mypress.com||</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.uk-experience.com/2009/01/26/wordpress-mass-account-import/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
	</channel>
</rss>
