Extension:ConfirmAccount

From MediaWiki.org
Revision as of 17:07, 15 July 2012 by Jasper Deng (talk | contribs) (Rejected the last text change (by 50.44.250.15) and restored revision 560088 by Acksys: It would be available in subversion.)
Jump to: navigation, search
<translate> MediaWiki extensions manual</translate>Manual:Extensions
Crystal Clear action run.png
Confirm Account

<translate> Release status:</translate>Extension status <translate> stable</translate>

ConfirmAccounts.png
<translate> Implementation</translate>Template:Extension#type User identity, Database, Special page
<translate> Description</translate>Template:Extension#description Requires submission and approval of accounts.
<translate> Author(s)</translate>Template:Extension#username Aaron Schulz
MediaWikiTemplate:Extension#mediawiki 1.11+
<abbr title="<translate> <tvarTemplate:Extension#needs-updatephp <translate> Yes</translate>
<translate> License</translate>Template:Extension#license GPL
<translate> Download</translate> Template:WikimediaDownload/svn
<translate> Added rights</translate>Template:Extension#rights

confirmaccount, requestips, lookupcredentials

<translate> Hooks used</translate>Template:Extension#hook
PersonalUrlsManual:Hooks/PersonalUrls
UserCreateFormManual:Hooks/UserCreateForm
UserLoginFormManual:Hooks/UserLoginForm
AbortNewAccountManual:Hooks/AbortNewAccount
LoadExtensionSchemaUpdatesManual:Hooks/LoadExtensionSchemaUpdates
SiteNoticeAfterManual:Hooks/SiteNoticeAfter

<translate> [[<tvar|1>translatewiki:Special:Translate/ext-confirmaccount</>|Translate the <tvar|2>ConfirmAccount</> extension]] if it is available at translatewiki.net</translate>

<translate>

[[<tvar|1>wikiapiary:Extension:ConfirmAccount</>|Check usage and version matrix.]] </translate>

The ConfirmAccount extension disables direct account creation and requires the approval of new accounts by a bureaucrat. Direct account creation can still be enabled (if you want Sysops/Bureaucrats to be able to directly make them) by configuring user rights.

The ConfirmEdit extension can be used (in conjunction with the ConfirmAccount extension) in order to use captchas to stop flood requests.

The new user log (now obsolete) extension also works with ConfirmAccount.

Setup

  • Download the latest snapshot of the extension version that matches your Mediawiki install version and extract it to your extensions directory. Select the snapshot for your version of MediaWiki.
  • version =< 1.16: To LocalSettings.php add:
require_once("$IP/extensions/ConfirmAccount/SpecialConfirmAccount.php");
require_once("$IP/extensions/ConfirmAccount/ConfirmAccount.php");
  • Change to the MediaWiki directory and run:
php maintenance/update.php

or, if not possible, run ConfirmAccount.sql (substituting db prefix and options):

mysql -h DB_HOST  -u WIKIUSER -p  WIKIDB  <  ConfirmAccount.sql
  • If you are using sqlite, go into LocalSetting.php and add $wgDBprefix =""; and then run the below command and php maintenance/update.php afterwards:
sqlite3 /var/www/vhosts/domain.com/data/databasefile < ConfirmAccount.sql

Configuration

There are several configuration variables that can be adjusted in LocalSettings.php (after the require_once line that includes ConfirmAccount.php). See ConfirmAccount.config.php for all the variables that can be set. (The default values are in ConfirmAccount.config.php, but you should not edit that file).

Note Note: In version MW1.18, there is no ConfirmAccount.config.php. The settings are in ConfirmAccount.php.

Note Note: By default, a 50 word biography is required for the new user to submit the request form. To adjust or disable this requirement, edit $wgAccountRequestMinWords in LocalSettings.php.

Note Note: Sysops can still create accounts directly. To disable this, to LocalSettings.php add:

$wgGroupPermissions['*']['createaccount'] = false;

Note Note: If only logged-in users are allowed to view pages, make sure you add the request account page to $wgWhitelistRead. For example:

$wgWhitelistRead = array('Special:RequestAccount','Main Page');
In other languages you have to replace "Special" and "Main Page" with the words that are used instead of special in your language like "Spezial" and "Hauptseite" in a German wiki, otherwise nobody will be able to create an account.

To further categorize users based on their interests, you can set up MediaWiki:Requestaccount-areas. This should be in a format like:

*Topic|Topic wiki page|text to append to all interested users' bios |text to append to all interested users' bios in group0|text to append to all interested users' bios group1|text to append to all interested users' bios in group2|...

These group numbers are based on $wgAccountRequestTypes. So if 0 is the index for 'authors', then 'authors' interested in a topic will have the group0 text appended to their biography. This can be useful, say, if users can be approved as either authors or editors. Authors can have "category:X authors" where X is a topic, like "mathematics", and editors can have "category:x editors". You can have as many groups as you want, but you need at least one.

Use

Confirming account requests on Special:ConfirmAccounts (beta form)
  1. As a bureaucrat (or other user with the confirmaccount permission), browse to Special:ConfirmAccounts
  2. Click Review
  3. You will see the whole form with the users' data. Carefully review the form, and proceed to creating the account or rejecting the request.
  4. If you chose to create the account, the user's biography will become their userpage and the userpage will be automatically created with the default summary of Creating user page with biography of new user.

Known issues

  • Do not set $wgGroupPermissions['*']['createaccount'] to true in LocalSettings, it will override the request login and allow users to sign up without confirmation.
  • Do not set/create MediaWiki:Requestaccount-areas/xx where xx is a language code, the first part of each line is used as the keys to store in the DB for the items account requesters check.
  • Older versions of MediaWiki may not show the link to Special:RequestAccount at the user login form. You can edit MediaWiki:loginprompt to remedy this.
  • Name collisions: account creations will be checked and stopped if it collides with a pending name. Requests are checked for pending/account name collisions too.
  • AuthPlugin stuff: If a central login like CentralAuth is used, when accounts are confirmed and made, we may get name collisions if each wiki of the farm lets you request accounts on it. Collisions are dealt with by picking a new name.
  • If your email client loses its mail data before sending it out, users will not get their passwords but may have an account. Since no one knows the passwords, you may want to use Extension:Password Reset to send them new ones.
  • If only a few people view the confirm accounts page, the randomly triggered pruning of old request will not trigger often, so old rejected requests may persist.
  • Integration with LDAP Authentication extension

External link