Extensão:ConfirmAccount

From MediaWiki.org
Jump to: navigation, search
This page is a translated version of the page Extension:ConfirmAccount and the translation is 12% complete.

Outdated translations are marked like this.
Other languages:
català • ‎dansk • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil • ‎sicilianu • ‎中文
Manual de extensões do MediaWikiManual:Extensions
Crystal Clear action run.svg
ConfirmAccount

Estado da versão:Extension status estável

ConfirmAccounts.png
ImplementaçãoTemplate:Extension#type User identity, Database, Special page
DescriçãoTemplate:Extension#description Requires submission and approval of accounts.
Autor(es)Template:Extension#username Aaron Schulztalk
MediaWikiTemplate:Extension#mediawiki 1.23+
Alterações à
base de dados
Template:Extension#needs-updatephp
Sim
TabelasTemplate:Extension#table1 account_requests
account_credentials
LicençaTemplate:Extension#license GNU General Public License 2.0 or later
Exportação (Download)
README
ParâmetrosTemplate:Extension#parameters
  • $wgMakeUserPageFromBio
  • $wgAutoUserBioText
  • $wgAutoWelcomeNewUsers
  • $wgRejectedAccountMaxAge
  • $wgConfirmAccountRejectAge
  • $wgAccountRequestThrottle
  • $wgAccountRequestWhileBlocked
  • $wgConfirmAccountRequestFormItems
  • $wgAccountRequestExts
  • $wgAccountRequestTypes
  • $wgConfirmAccountSortkey
  • $wgConfirmAccountSaveInfo
  • $wgConfirmAccountContact
  • $wgConfirmAccountCaptchas
  • $wgConfirmAccountFSRepos
  • $wgConfirmAccountNotice
Privilégios adicionadosTemplate:Extension#rights
  • confirmaccount
  • requestips
  • lookupcredentials
Hooks usadosTemplate:Extension#hook
LoadExtensionSchemaUpdatesManual:Hooks/LoadExtensionSchemaUpdates
PersonalUrlsManual:Hooks/PersonalUrls
UserCreateFormManual:Hooks/UserCreateForm
UserLoginFormManual:Hooks/UserLoginForm
BeforePageDisplayManual:Hooks/BeforePageDisplay
AdminLinksManual:Hooks/AdminLinks
AuthChangeFormFieldsManual:Hooks/AuthChangeFormFields

Traduza a extensão ConfirmAccount se ela estiver disponível na wiki translatewiki.net

Verifique a matriz de utilização e versões

ProblemasPhabricator

Tarefas em aberto · Reportar um problema

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.

Instalação

  • Exporte e coloque o ficheiro, ou ficheiros, num diretório chamado ConfirmAccount, na sua pasta extensions/.
  • Acrescente o seguinte código ao fundo do ficheiro LocalSettings.php:
    require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
    
  • Execute o script de atualização que irá criar automaticamente as tabelas da base de dados necessárias para esta extensão.
  • Ensure the wiki has write permissions on $wgUploadDirectory, or manually set $wgFileStoreManual:$wgFileStore['accountreqs'] and $wgFileStore['accountcreds'] to a writable directory of your choice.
  • YesY Pronto - Na página especial Special:Version da sua wiki verifique se a extensão foi instalada.

Configuração

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).

By default, a 6 word biography is required for the new user to submit the request form. To adjust this requirement, edit $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;
Sysops can still create accounts directly. To disable this, add to LocalSettings.php:
$wgGroupPermissions['sysop']['createaccount'] = false;
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 "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.

Minimal settings

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 = array(
 	'UserName'        => array( 'enabled' => true ),
 	'RealName'        => array( 'enabled' => false ),
 	'Biography'       => array( 'enabled' => false, 'minWords' => 50 ),
 	'AreasOfInterest' => array( 'enabled' => false ),
 	'CV'              => array( 'enabled' => false ),
 	'Notes'           => array( 'enabled' => true ),
 	'Links'           => array( 'enabled' => false ),
 	'TermsOfService'  => array( 'enabled' => false ),
 );

Optionally tweak system messages: requestaccount-text, requestaccount-notes, requestaccount-ext-text, requestaccount-acc-text.

Uso

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.
  5. 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

Note: In order for bureaucrats to get notified of pending requests you need to set an email / mailing list in 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

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".

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.
  • 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.
  • Integration with LDAP Authentication extension
  • For MW 1.26, this extension is partially incompatible with the ConfirmEdit extension - it only works for logged on users (obviously, this is not necessary), but for anonymous users it displays an empty screen, but works fine when ConfirmEdit is not used.

Troubleshooting

Notification emails do not get sent

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 Opções do correio eletrónico in Special:Preferences allow "Permitir que outros utilizadores me enviem correio eletrónico" and that they have confirmed their email address within the same form.

Ver também

References