allwiki首页  
天下维客 你可以修改的网络知识库
首页最近更改优秀条目专题展示电脑科技词典软件学习网络知识电脑安全明星时尚天下百科
 

MediaWiki扩展:登录时核查Email

天下维客,你可以修改的网络知识库

Jump to: navigation, search

本文取自元维基,欢迎共同翻译、整理与大家共享,促进中文wiki发展^_^

This describes a hack for wiki 1.5.6 by Tbsmith that requires an email address to sign up.

It is important to note that this will only require something to be specified in the email field. It does not actually check to see if that email address is valid or if the user actually owns the email address. Combine this method with Email_authentication_before_editing (in 1.5) or the $wgEmailConfirmToEdit variable (in 1.6) for greater effect.

In 1.5, change the first line and add the second to languages/Language.php at about line 600. In 1.6, you have to change languages/Messages.php instead of Language.php around line 380.

'youremail'     => 'Email',
'noemailonsignup'       => 'An email address is required to sign up.',

Add to includes/SpecialUserlogin.php (around line 220):

       if ( !$this->mEmail ) {
           $this->mainLoginForm( wfMsg( 'noemailonsignup' ) );
           return false;
       }

Put it just above this block:

       if ( 0 != strcmp( $this->mPassword, $this->mRetype ) ) {
           $this->mainLoginForm( wfMsg( 'badretype' ) );
           return false;
       }

原文参见: Email required to sign up

Personal tools
工具
金银币拍卖 金币拍卖预展  金银币网店 熊猫金银币 生肖金银币