• I am trying to find a way to create many users at a time in a wordpress 3.0 single site blog.

    the idea is to allow us to contact our members when a new newsletter is available or to notify them of a new event coming up

    as there are over 150 members it would take me too long to create them all, so a quick fix would be very helpful.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    If you don’t mind writing a bit of code, it’s easy to create users.

    <?php
    require( '/wp-load.php' );
    wp_create_user('otto', 'password', '[email protected]');
    wp_create_user('fake', 'fakepass', '[email protected]');
    ... and so on ...

    Just make a php file in the main blog directory that looks like that and run it one time. Delete it after the users are created.

    Function call looks like this:
    wp_create_user($username, $password, $email);

    Alternatively, just edit the database directly. For the passwords, use the MD5 hash of the password in the database field. That hash will get converted to something more secure after they log in the first time.

    I’m gonna need something similar, thanks for the pointer Otto.

    @ady, tomorrow or the day after that I’ll be probably done with this, I’ll post the solution here.

    grtz,
    ToM.

    I also noticed that wordpress “salts” passwords after the first login… but still lets you use a standard MD5 hash the first time… which is a huge benefit for automatically creating users.

    I would imagine Otto’s script could be made to add the same “salting” hash by plugging into the wp_salt() function?

    Thoughts?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mass User Creation in WordPress 3.0’ is closed to new replies.