Wordpress: Dagon Design User Importer

I am using this plugin on wordpress to import users:
http://www.dagondesign.com/articles/import-users-plugin-for-wordpress/

I would like to import more than just the basic wordpress user fields. How can I customize this to add phone, address, etc??

<?php
/*
Plugin Name: Dagon Design Import Users
Plugin URI: http://www.dagondesign.com/articles/import-users-plugin-for-wordpress/
Description: Import list of users into WordPress. To use, go to ‘Manage -> DDImport Users’.
Author: Dagon Design
Version: 1.2
Author URI: http://www.dagondesign.com/
Contributor: Nicholas LaRacuente, http://www.sccs.swarthmore.edu/users/10/ndl
*/

/*
2009-01-24 - Modified by Robert McKenzie (rmckenzi@rpmdp.com) http://www.gammaray-tech.com

Modifications to this script include the ability to specify a password as well as first and last names.

Firstname, Lastname and Password are optional but the fields must be delimited, ie:

bill|Bill|Smith|blahblah|bill.smith@blah.com
jim|Jim|||Jim@blah.com

In the case of a missing password the script will generate one as the original script did and email that
password to the new user.  If the password has been specified it will also be sent to the user

*/

$ddui_version = ‘1.2’;

function ddiu_add_management_pages() {
if (function_exists(‘add_management_page’)) {
add_management_page(‘Import Users’, ‘DDImportUsers’, 8, FILE, ‘ddiu_management_page’);
}
}

#can specify how to parse submitted file by editing this function
function fileParseFunction($filename){
return file($filename);
}

#modify this function to specify how to parse text in field
#could change format or add validation
function fieldParseFunction($text){
return explode("
", trim($text));
}

#specify format information to be displayed to the user
$formatinfo = ‘<p><strong>The data you enter MUST be in the following format:</strong><br />
   username(delimiter)firstname(delimiter)lastname(delimiter)password(delimiter)email(delimiter)role<br />
   username(delimiter)firstname(delimiter)lastname(delimiter)password(delimiter)email(delimiter)role<br />
   etc…<br />
</p>’;

function ddiu_management_page() {

global $wpdb, $wp_roles, $formatinfo, $ddui_version;

$result = "";

if (isset($_POST['info_update'])) {

	?&gt;&lt;div id="message" class="updated fade"&gt;&lt;p&gt;&lt;strong&gt;&lt;?php 

	echo "Processing Complete - View Results Below";

    ?&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&lt;?php


	//
	// START Processing
	//


	$the_role = (string)$_POST['ddui_role'];
	$delimiter = (string)$_POST['delimiter'];

	// get data from form and turn into array
	$u_temp = array();
	if(trim((string)$_POST["ddui_data"]) != ""){
		$u_temp = array_merge($u_temp, fieldParseFunction(((string) ($_POST["ddui_data"]))));
	}
	else{
		$result .= "&lt;p&gt;No names entered in field.&lt;/p&gt;";
	}
	if ($_FILES['ddui_file']['error'] != UPLOAD_ERR_NO_FILE){#Earlier versions of PHP may use $HTTP_POST_FILES
		$file = $_FILES['ddui_file'];
		if($file['error']){
			$result .= '&lt;h4 style="color: #FF0000;"&gt;Errors!&lt;/h4&gt;&lt;p&gt;';
			switch ($file['error']){
				case UPLOAD_ERR_INI_SIZE:
					$result .= "File of ".$file['size']."exceeds max size ".upload_max_filesize;
					break;
				case UPLOAD_ERR_FORM_SIZE:
					$result .= "File of ".$file['size']."exceeds max size ".upload_max_filesize;
					break;
				case UPLOAD_ERR_PARTIAL:
					$result .= "File not fully uploaded";
					break;
				default:
			}
			$result.='.&lt;/p&gt;';
		}
		elseif(!is_uploaded_file($file['tmp_name'])){
			$result = "File ".$file['name']." was not uploaded via the form.";
		}
		else{ #should be ok to read the file now
			$u_temp = array_merge($u_temp, fileParseFunction($file['tmp_name']));
		}
	} else{
		$result .= "&lt;p&gt;No file submitted.&lt;/p&gt;";
	}

	$u_data = array();
	$i = 0;

	foreach ($u_temp as $ut) {

		if (trim($ut) != '') {

			if (! (list($u_n, $u_f, $u_l, $u_p, $u_e, $u_r)  = @split($delimiter, $ut, 6))){
				$result .= "&lt;p&gt;Regex ".$delimiter." not valid.&lt;/p&gt;";
			}
			
			$u_n = trim($u_n);
			$u_f = trim($u_f);
			$u_l = trim($u_l);
			$u_p = trim($u_p);
			$u_e = trim($u_e);
			$u_r = trim($u_r);

			//if (($u_n != '') && ($u_f != '') && ($u_l != '') && ($u_p != '') && ($u_e != '')) {
			if (($u_n != '') && ($u_e != '')) {

				$u_data[$i]['username'] = $u_n;
				$u_data[$i]['firstname'] = $u_f;
				$u_data[$i]['lastname'] = $u_l;
				$u_data[$i]['password'] = $u_p;
				$u_data[$i]['email'] = $u_e;
				$u_data[$i]['role'] = $u_r;
				$i++;

			}

		}

	}
	
	// print_r($u_data);

	// process each user

	$errors = array();
	$complete = 0;

	foreach ($u_data as $ud) {

		// check for errors
		$u_errors = 0;

		$user_line = '&lt;b&gt;' . htmlspecialchars($ud['username']) . '|' . htmlspecialchars($ud['firstname']) . '|' . htmlspecialchars($ud['lastname']) . '|' . htmlspecialchars($ud['password']) . '|' . htmlspecialchars($ud['email']) . '|' . htmlspecialchars($ud['role']) . '&lt;/b&gt;';

		if (!is_email($ud['email'])) {
			$errors[] = 'Invalid email address: ' . $user_line;
			$u_errors++;
		}

		if (!validate_username($ud['username'])) {
			$errors[] = 'Invalid username: ' . $user_line;
			$u_errors++;
		}

		if (username_exists($ud['username'])) {
			$errors[] = 'Username already exists: ' . $user_line;
			$u_errors++;
		}

		
		$email_exists = $wpdb-&gt;get_row("SELECT user_email FROM $wpdb-&gt;users WHERE user_email = '" . $ud['email'] . "'");
		if ($email_exists) {
			$errors[] = 'Email address already in use: ' . $user_line;
			$u_errors++;
		}

		
		if ($u_errors == 0) {

			// generate passwords if none were provided in the import
			if ($u_p == '') {
				$password = substr(md5(uniqid(microtime())), 0, 7);
			} else {
				$password = $ud['password'];
			}

			// create user
			$user_id = wp_insert_user(array(
							"user_login" =&gt; $ud['username'],
							"first_name" =&gt; $ud['firstname'],
							"last_name" =&gt; $ud['lastname'],
							"user_pass" =&gt; $password,
							"user_email" =&gt; $ud['email'])
							);
			if (!$user_id) {
				$errors[] = 'System error! Could not add: ' . $user_line;
			} else {
				//wp_new_user_notification($user_id, $password);
				$complete++;

				// set role
				if ($ud['role'] == '') {
					$ruser = new WP_User($user_id);
					$ruser-&gt;set_role($the_role);
				} else {
					$ud['role'] = strtolower($ud['role']);
					$ruser = new WP_User($user_id);
					$ruser-&gt;set_role($ud['role']);
				}
			}



		}

	}




	// show result

	if ($complete &gt; 0) {

		$result .= "&lt;p&gt;Processing complete: &lt;b&gt;" . $complete . " users imported!&lt;/b&gt;&lt;/p&gt;";
		$result .= "&lt;p&gt;Role: &lt;b&gt;" . $the_role . "&lt;/b&gt;&lt;/p&gt;";
		$result .= "&lt;p&gt;(These users will receive an email notification with their assigned password.)&lt;/p&gt;";

	}
	
	if ($errors) {

		$result .= '&lt;h4 style="color: #FF0000;"&gt;Errors!&lt;/h4&gt;&lt;ul&gt;';
		foreach ($errors as $er) {
			$result .= '&lt;li&gt;' . $er . '&lt;/li&gt;';
		}
		$result .= '&lt;/ul&gt;';

	}
	


	//
	// END Processing
	//





} ?&gt;

&lt;div class=wrap&gt;

&lt;h2&gt;Import Users v&lt;?php echo $ddui_version; ?&gt;&lt;/h2&gt;

&lt;p&gt;For information and updates, please visit:&lt;br /&gt;
&lt;a href="http://www.dagondesign.com/articles/import-users-plugin-for-wordpress/"&gt;http://www.dagondesign.com/articles/import-users-plugin-for-wordpress/&lt;/a&gt;&lt;/p&gt;

&lt;?php 
	if ($result != "") { 
		echo '&lt;div style="border: 1px solid #000000; padding: 10px;"&gt;';
		echo '&lt;h4&gt;Results&lt;/h4&gt;';
		echo trim($result); 
		echo '&lt;/div&gt;';
	} 
?&gt;


&lt;form enctype="multipart/form-data" method="post" action="&lt;?php echo $_SERVER["REQUEST_URI"]; ?&gt;"  &gt;
&lt;input type="hidden" name="info_update" id="info_update" value="true" /&gt;


&lt;div style="padding: 0 0 15px 12px;"&gt;

	&lt;?php print $formatinfo; ?&gt;
	&lt;h3&gt;User Data&lt;/h3&gt;
	May specify the (regex) delimiter between name, email and password (default "[|]").
	&lt;input type="text" name="delimiter" value="[|]" /&gt;
	&lt;br /&gt;
	May type username|password|email pairs directly.&lt;br /&gt;
	&lt;textarea name="ddui_data" cols="100" rows="12"&gt;&lt;/textarea&gt;
	&lt;br /&gt;
	May submit a file.
	&lt;input type="file" id="ddui_file" name="ddui_file" value="TestInput" /&gt;

	&lt;div style="margin: 6px 0 0 0;"&gt;
	&lt;br /&gt;&lt;b&gt;Role for these users:&lt;/b&gt; 			
	&lt;select name="ddui_role"&gt;		
	&lt;?php
		if ( !isset($wp_roles) ) 
			$wp_roles = new WP_Roles();
		foreach ($wp_roles-&gt;get_names() as $role=&gt;$roleName) {
		echo '&lt;option value="'.$role.'"&gt;'.$roleName.'&lt;/option&gt;';
		}
	?&gt;	
	&lt;/select&gt;
	&lt;/div&gt;
&lt;/div&gt;


&lt;div class="submit"&gt;
	&lt;input type="submit" name="info_update" value="&lt;?php _e('Import Users'); ?&gt; &raquo;" /&gt;
&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;&lt;?php

}

add_action(‘admin_menu’, ‘ddiu_add_management_pages’);

?>

Hmmm, it’s kind of a non-trivial question. I think the best and easiest thing to do first is to ask the plug-in developer. If that’s not fruitful, then the next thing to do is to format the code so it’s readable. Where are you, programming-wise? Can you sort of read the code and understand what it’s doing?