I would like to share a document with about 140 users after password authentication and I want to avoid to create manually all the 140 accounts. Is it possible to create them quickly?
UPDATE: usernames to add are stored into a text file. The question is focused on the batch users creation because I will create a password-protected area where all the users will access to download the document.
This is a small code I wrote to batch create generic users
Setup
A couple things to do:
$lock
to false.wp-load.php
.$limit
to the number of users you want to create.Use
This script will create
$limit
number of users with the usernameuser_andTheirID
and their e-mail addressuserTheirID@example.com
. To edit the username, once the users have been created, you will have to edit the database itself.Extra
If you want users to change their passwords from the default,
changeme
, try the Force Password Change plugin by Simon Blackbourn. This will require users to change their password on their first log in. Make sure you install this plugin BEFORE you run the batch create, otherwise the right values will not be created for the existing users.You’ll need a plugin to do batch import.
This one allows you to import records from a CSV file.
Importing WordPress users from a CSV file is easily possible with this free WordPress user import export plugin by WebToffee.