Here's the problem: I've a classic site, by having an old userdatabase (MySQL). Let me migrate these customers into wordpress without losing that old data (recipe id's, custom user fields etc.).
Besides this let me create a custom registration page with the (extra) user data i allready had around the old site.
I attempted to locate some plug ins (Wordpress-people, Registration Widget, Register Plus ReduxAnd so on.), however they all did not fit my purpose.
I am beginning to consider which i most likely have to code this myself, but that can make Wordpress not able to update.
Does anybody possess a solution with this problem?
Ought to be simple enough although you might want to assign customers a brand new password. That's usually comfortable with the customers as lengthy because they know it's coming.
Take your old database and also to an easy sql query to extract the information, then apply certain code such as the following to produce a new user for every user inside your old database:
$newuser = array( 'user_pass' => wp_generate_password( 12,0 ), 'user_login' => $email, 'user_nicename' => $name['first'].' '.$name['last'], 'user_email' => $email, 'display_name' => $name['first'].' '.$name['last'], 'nickname' => $name['first'].' '.$name['last'], 'first_name' => $name['first'], 'last_name' => $name['last'], //'' ); $user_id = wp_insert_user($newuser); wp_new_user_notification($user_id, $newuser['user_pass']);
This code works by WordPress 3.1. Within this example you'd only desire to replace the $title variables with data that you have provided out of your old database.
The final two line is important because this is where the actual work happens. The wordpress_place_user function can create the consumer (or throw a mistake if you are missing info) and also the wordpress_new_user_notification function will be sending them an e-mail using their password. I'd recommend making the effort to rewrite the brand new user notification wordpress plugin (it is a pluggable function so that you can just copy paste it for your functions.php making changes there) to ensure that the e-mail customers get is sensible. You might write your personal email function or maybe your passwords are saved in plain text simply pass that info onto Wordpress.
Edit: I skipped your requirement for custom fields, Gravity Forms performs this very well but you can include a custom area to the user using the update_user_meta function. So within the sample code above you'd simply want add something next like:
update_user_meta($user_id, "my_custom_data_key", "my_custom_data_value");
To retrieve that data for display, you'd only use get_user_meta:
print get_user_meta($user_id, "my_custom_data_key");