Extension:ImportUsers

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
ImportUsers Extension

Release status: beta

Implementation Special page, User identity, Database
Description Import users in bulk from a CSV file.
Author(s) RouslanZenetl, YuriyIlkiv
Version 0.0.4 (2008-02-10)
MediaWiki 1.12 (see download link for versions below, back to 1.6.8)
Download svn
pre 1.12 version
License
log

The ImportUser extension adds special page Special:ImportUsers which can be used by bureaucrat (or others who have 'import_users' right) to imports users from a CSV file to MediaWiki's user database.

Contents

[edit] Import File Format

The CSV file consists of four columns:

  1. username
  2. password
  3. email
  4. real name

Delimited with commas. For an example:

user1,pass1,user1@gmail.com,User One
user2,pass2,user2@gmail.com,User Two
user3,pass3,user3@gmail.com,User Three
user4,pass4,user4@gmail.com,User Four
user5,pass5,user5@gmail.com,User Five
user6,pass6,user6@gmail.com,User Six
.
.
.
userN,passN,userN@gmail.com,User Nnn

[edit] Duplicate/Collision handling

Extension:ImportUsers extension will never create duplicate user accounts.

What is account collision?

Two accounts are in collision (or are duplicates of each other) if their login names (user names) are equal.

Collision handling behavior is determined by the "Replace existing users" check box.

When "Replace existing users" check box is clear (unchecked), Extension:ImportUsers extension will ignore records in the input file which are duplicates of existing accounts.

When "Replace existing users" check box is checked, Extension:ImportUsers extension will update corresponding accounts with data from input file.

Note, that MediaWiki tolerates duplicate email addresses. In other words, there may be multiple accounts connected to the same email address. Extension:ImportUsers extension will not validate for duplicate email addresses.

[edit] Installation

Add the following line to LocalSettings.php:

require_once("$IP/extensions/ImportUsers/SpecialImportUsers.php");

That's it!

[edit] License

You are free to use this extension for any reason and mutilate it to your heart's liking. If you feel your work might benefit others, post your changes here.

Personal tools