Git Product home page Git Product logo

mediawiki-extensions-migrateuseraccount's Introduction

MigrateUserAccount

Allows users to reclaim their account on a wiki by verifying their identity on an external wiki. This is especially useful if you are forking a wiki from another wiki farm, but don't have access to the old wiki's user database.

This extension is designed to only work on users that have an empty password field in your MediaWiki user table, to avoid impacting regular users. You can generate entries in your user table using the grabber scripts on MediaWiki.org, specifically the populateUserTable.php script.

How it works

  • Users can go to Special:MigrateUserAccount and enter their account username from the previous wiki
  • As long as the account in the user table has an empty user_password field, the page will present a unique token (generated as a combination of user:session_id and salted with a secret provided in $wgMUATokenSecret)
  • The user is directed to edit their user page on the previous wiki and insert this unique token into the revision content or the edit summary
  • Once done, the user presses a confirmation button on our wiki, which will make an API call to check the latest revision on the previous wiki
  • If the token is present, and was added by the same user, then the migration can succeed and the user can reset their password to gain access to their account

Installation

  1. Clone this repository to your MediaWiki installation's extensions folder using git clone https://github.com/weirdgloop/mediawiki-extensions-MigrateUserAccount.git -b MigrateUserAccount
  2. Modify your LocalSettings.php file and add:
wfLoadExtension( 'MigrateUserAccount' );

# These two options must be configured for this extension to function correctly:
$wgMUARemoteWikiContentPath = '';
$wgMUARemoteWikiAPI = '';

# You should also set a secret to be used in token generation (hexadecimal).
# The value below is an example, but you should use your own.
# You must keep this secret private.
$wgMUATokenSecret = '09af3bbba6a3ac5d2b7554f5a1e1495d';

Configuration

This extension can be configured using the LocalSettings.php file in your MediaWiki installation.

Variable Type Description Default
$wgMUATokenSecret hex Hex string used as a secret during token generation
$wgMUARemoteWikiContentPath string URL to the remote wiki's content path (with trailing slash). For FANDOM sites, this is something like https://community.fandom.com/wiki/
$wgMUARemoteWikiAPI string URL to the remote wiki's API. For FANDOM sites, this is something like https://community.fandom.com/api.php
$wgMUAShowNoticeOnLogin bool Whether to show a message directing users to migrate their accounts if necessary on Special:UserLogin and Special:CreateAccount (if you prefer, set this to false and set your own message in MediaWiki:Loginprompt on your wiki) true
$wgMUALogToWiki bool Whether we should log to a public log on Special:Log when a user migrates their account true
There are some additional config variables that you can find in extension.json, but they should generally not be used outside of Weird Gloop wikis.

Debugging

This extension logs to the channel MigrateUserAccount.

License

This extension is licensed under GPLv3 - see the license file.

It is inspired by an extension called UserMigration, which is no longer maintained. That project was maintained by foxlit, Alexia E. Smith (Curse Inc.), and others.

mediawiki-extensions-migrateuseraccount's People

Contributors

dianliang233 avatar jayktaylor avatar

Forkers

vil4ckc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.