Extension:Email authentication before editing
From MediaWiki.org
This extension is obsolete!
It has been replaced by core functionality in the MediaWiki software (which was added in version 1.6).
|
Release status: unstable |
|
|---|---|
| Implementation | User activity |
| Description | Force users to confirm their email before editing |
| License | No license specified |
| Download | no link |
|
check usage (experimental) |
|
If you are using 1.6, just add '$wgEmailConfirmToEdit = true;' to the end of your LocalSettings.php file.
This extension is still online for those wiki, which stay on version 1.5.x.
This extension for MW 1.5 makes your wiki require email authentication from new users before editing.
For those with 1.5, first add this code to includes/EditPage.php (~line 158):
....
if ( !$wgUser->isAllowed('edit') ){
if ( $wgUser->isAnon() ) {
$this->userNotLoggedInPage();
return;
} else {
$wgOut->readOnlyPage( $this->mArticle->getContent( true ), true );
return;
}
}
## Add this for email authentication before editing#
if ( !$wgUser->getEmailAuthenticationTimestamp() ) {
$this->userHasNotAuthenticatedEmailPage();
return;
}
#################################################
if ( wfReadOnly() ) {
....
Put this code in the same file above the userNotLoggedInPage function on about line 858:
#### Add this function for Email Authentication before editing ###
function userHasNotAuthenticatedEmailPage() {
global $wgOut;
$wgOut->setPageTitle( wfMsg( 'noemailauthtitle' ) );
$wgOut->setRobotpolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
$wgOut->addWikiText( wfMsg( 'noemailauthtext' ) );
$wgOut->returnToMain( false );
}
###################################################################
function userNotLoggedInPage() {
....
Add this to languages/Language.php line 692: (for 1.6 seems like context is in languages/Messages.php (-- added edit)
'whitelistedittitle' => 'Login required to edit', 'whitelistedittext' => 'You have to [[Special:Userlogin|login]] to edit pages.', ###### Add for email auth before editing ############### 'noemailauthtitle' => 'Email Authentication Required', 'noemailauthtext' => 'You have to [[Special:Confirmemail|confirm]] your email address to edit pages.', ########################################################