Extension:ConfirmAccount
ConfirmAccount リリースの状態: 安定 |
|
---|---|
![]() |
|
実装 | 利用者識別 , データベース , 特別ページ |
説明 | Requires submission and approval of accounts. |
作者 | Aaron Schulzトーク |
MediaWiki | 1.23+ |
データベースの変更 | はい |
テーブル | account_requests account_credentials |
ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
ダウンロード | README |
|
|
|
|
translatewiki.net で翻訳を利用できる場合は、ConfirmAccount 拡張機能の翻訳にご協力ください | |
問題点 | 未解決のタスク · バグを報告 |
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 管理者 /Bureaucrats to be able to directly make them) by configuring 利用者権限 .
The ConfirmEdit extension can be used (in conjunction with the ConfirmAccount extension) in order to use captchas to stop flood requests.
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のConfirmAccount
という名前のディレクトリ内に配置します。 - 以下のコードを LocalSettings.php の末尾に追加します:
wfLoadExtension( 'ConfirmAccount' );
- 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベース テーブルを自動的に作成します。
- Ensure the wiki has write permissions on
$wgUploadDirectory
.
- As of 26 Sep 2020 there seems to be an issue with permissions when using
wfLoadExtension()
: thecreateaccount
permission may not be revoked from theall users
group.
$wgGroupPermissions['*']['createaccount'] = false;
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
MediaWiki 1.24 以前を稼働させている利用者へ:
上記の手順では、wfLoadExtension()
を使用してこの拡張機能をインストールする新しい方法を記載しています。
この拡張機能をこれらの過去のバージョン (MediaWiki 1.24 以前) にインストールする必要がある場合は、wfLoadExtension( 'ConfirmAccount' );
の代わりに以下を使用する必要があります:
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
設定
Optional
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).
For example, to set the person's bio as their userpage, set $wgMakeUserPageFromBio = true.
$wgConfirmAccountRequestFormItems['Biography']['minWords']
in LocalSettings.php, e.g. for 10 words:$wgConfirmAccountRequestFormItems['Biography']['minWords'] = 10;
To disable the biography, set $wgConfirmAccountRequestFormItems ['Biography']['enabled']
to false
:
$wgConfirmAccountRequestFormItems['Biography']['enabled'] = false;
$wgGroupPermissions['sysop']['createaccount'] = false;
$wgWhitelistRead = array( 'Special:RequestAccount', 'Main Page' );
- In other languages you have to replace "Main Page" and "Special:RequestAccount" with their local names, for instance "Hauptseite" and "Spezial:Benutzerkonto_beantragen" in a German wiki.
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.
最低限
To attempt to prevent spam, instead of captchas, blacklists and filters; manually moderate new user registrations, with a simpler Request account. Requesting only a username, email address and brief message. Add the following to LocalSettings.php after the line require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";.
$wgMakeUserPageFromBio = false;
$wgAutoWelcomeNewUsers = false;
$wgConfirmAccountRequestFormItems = [
'UserName' => [ 'enabled' => true ],
'RealName' => [ 'enabled' => false ],
'Biography' => [ 'enabled' => false, 'minWords' => 50 ],
'AreasOfInterest' => [ 'enabled' => false ],
'CV' => [ 'enabled' => false ],
'Notes' => [ 'enabled' => true ],
'Links' => [ 'enabled' => false ],
'TermsOfService' => [ 'enabled' => false ],
];
Optionally tweak system messages: requestaccount-text, requestaccount-notes, requestaccount-ext-text, requestaccount-acc-text.
使用法
- As a bureaucrat (or other user with the confirmaccount permission), browse to
Special:ConfirmAccounts
- Click Review
- You will see the whole form with the users' data.
Carefully review the form, and proceed to creating the account or rejecting the request.
- 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.
- After an account is created, the data input by the user at the time of the request can be referred to by typing the username at
Special:UserCredentials
LocalSettings.php
:
$wgConfirmAccountContact = 'Bureaucrat@domain.com';
Sending notification email to multiple users
This extension allows sending emails to multiple approvers to confirm the account if these users have the confirmaccount-notify
permission. This is in addition/alternative to the $wgConfirmAccountContact
setting.
This can be achieved (for instance for bureaucrats) by providing them this permission by adding the following to LocalSettings.php
:
$wgGroupPermissions['bureaucrat']['confirmaccount-notify'] = true;
Enhancements
Pruning Frequency
To combat robot-requests, default settings prevent rejected email accounts from re-requesting an account for a random period of time after rejection. If you want rejected emails to be able to re-request accounts immediately after rejection, or after a fixed wait-time (days, weeks, months, or even years after rejection), apply the following 2 steps:
1) In LocalSettings.php, after required declaration, set Rejected-Age to 0 (for immediate expiration on rejection), or to your desired wait-time, in seconds:
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
$wgRejectedAccountMaxAge = 0;
2) Add one line to the file /frontend/specialpages/actions/RequestAccount_body.php
at the very end of the function showForm()
which shows the Request form, to force pruning right before any new request:
original code:
$out->addWikiMsg( 'requestaccount-footer' );
}
new code:
$out->addWikiMsg( 'requestaccount-footer' );
# PRUNE
ConfirmAccount::runAutoMaintenance();
}
"Request account" Link
If you would like to add a "Request account" login link add the following to the "LocalSettings.php" file:
$wgHooks['PersonalUrls'][] = 'onPersonalUrls';
function onPersonalUrls( array &$personal_urls, Title $title, SkinTemplate $skin ) {
// Add a link to Special:RequestAccount if a link exists for login
if ( isset( $personal_urls['login'] ) || isset( $personal_urls['anonlogin'] ) ) {
$personal_urls['createaccount'] = array(
'text' => wfMessage( 'requestaccount' )->text(),
'href' => SpecialPage::getTitleFor( 'RequestAccount' )->getFullURL()
);
}
return true;
}
as well as the text "Request account" to page "MediaWiki:Requestaccount".
既知の問題点
- 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.
- 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 or Special:ResetPassword to send them new ones.
- If only a few people view the confirm accounts page, the randomly triggered pruning of old requests will not trigger often, so old rejected requests may persist.
This prevents email addresses from re-requesting accounts for an unknown time period. You can override this behavior, and allow immediate re-requests, by forcing prune right before any new Request is submitted. Instructions here.
トラブルシューティング
- Notification emails do not get sent
If you are testing, note that a user must first confirm their email address through the link emailed to them, and then the email will be sent to the bureaucrat to confirm the account.
Make sure that setting(s) related to extension are introduced after the require_once line. Not before, otherwise extension doesn't see these settings and they fail silently. e.g.
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
$wgConfirmAccountContact = "admin@example.com";
Also note that when using the 'confirmaccount-notify' setting, that each user in the group (e.g. sysop) will not receive notices unless their メールの設定 in Special:Preferences allow "他の利用者からのメールを受け取る" and that they have confirmed their email address within the same form.
関連項目
- Extension:InviteSignup, for administrator-initiated (mass) account creation
- TwnMainPage extension, offering a "sandbox" where user can create an unprivileged account, propose some edits and ask approval
References
- Stable extensions/ja
- User identity extensions/ja
- Database extensions/ja
- Special page extensions/ja
- GPL licensed extensions/ja
- Extensions in Wikimedia version control/ja
- AdminLinks extensions/ja
- AuthChangeFormFields extensions/ja
- BeforePageDisplay extensions/ja
- LoadExtensionSchemaUpdates extensions/ja
- PersonalUrls extensions/ja
- UserCreateForm extensions/ja
- UserLoginForm extensions/ja
- All extensions/ja