Extension:MigrateUserAccount
MigrateUserAccount Release status: stable |
|
---|---|
Implementation | User identity , Special page |
Description | Allows users to reclaim their account on a wiki by verifying their identity on an external wiki |
Author(s) | |
Latest version | 1.0.0 (2023-07-16) |
Compatibility policy | Main branch maintains backward compatibility. |
MediaWiki | 1.35+ |
Database changes | No |
License | GNU General Public License 3.0 or later |
Download | GitHub: Note: README |
The MigrateUserAccount extension 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. It was built for the Weird Gloop family of wikis, but can be configured for any wiki.
Similarly to Extension:StubUserWikiAuth, this extension only works for users that have an empty password field on the database (the user_password
field of the user table is empty), which usually comes from running the scripts in Manual:Grabbers.
It works by adding a new special page, Special:MigrateUserAccount, where users can reclaim their account. The user enters their account username, and if the user has an empty password field in the database, it will provide a generated token for users to add to the external wiki's user page (either in the content or in the edit summary). The user can then press a button to confirm that they've completed this, and the extension will make an API call to the external wiki to confirm. If the user edited the page with the token successfully, they are then prompted to enter new credentials for the current wiki.
This extension simply lets people reclaim their account, and thus any edits and contributions assigned to them. It does not import preferences, the watchlist, or other information from the external wiki.
Installation
[edit]- Download and place the file(s) in a directory called
MigrateUserAccount
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'MigrateUserAccount' );
- Configure as required.
- Done â Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration
[edit]Add the following in LocalSettings.php:
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';
For more information on configuration for the extension, see the README.
Logging
[edit]Successful attempts at reclaiming user accounts are logged publicly to Special:Log/newusers on the wiki. This can be disabled by setting $wgMUALogToWiki = false;
in your LocalSettings.php.
More verbose logging can be found by enabling the debug log group for the extension. The extension logs to the channel MigrateUserAccount
for every attempted migration, error, and success.