(bug 4319) Don't show a "create account" link on the login form when account creation...
authorRob Church <robchurch@users.mediawiki.org>
Wed, 22 Feb 2006 21:37:18 +0000 (21:37 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 22 Feb 2006 21:37:18 +0000 (21:37 +0000)
RELEASE-NOTES
includes/SpecialUserlogin.php

index 582a9d8..097a9df 100644 (file)
@@ -360,6 +360,8 @@ Special Pages:
 * (bug 5018) Anchors for each message in Special:Allmessages
 * Introduce $wgWantedPagesThreshold per bug 5011; Special:Wantedpages will not
   list pages with less than this number of links. Defaults to 1.
+* (bug 4319) Don't show a "create account" link on the login form when
+  account creation is disabled.
 
 Misc.:
 * PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect
index a9b4d5c..de67fda 100644 (file)
@@ -484,9 +484,12 @@ class LoginForm {
                $link .= wfMsgHtml( $linkmsg . 'link' );
                $link .= '</a>';
 
-               $template->set( 'link', wfMsgHtml( $linkmsg, $link ) );
+               # Don't show a "create account" link if the user can't
+               if( $this->mType == 'signup' || ( $this->mType == 'login' && $wgUser->isAllowedToCreateAccount() ) ) {
+                       $template->set( 'link', wfMsgHtml( $linkmsg, $link ) );
+               }               
+               
                $template->set( 'header', '' );
-
                $template->set( 'name', $this->mName );
                $template->set( 'password', $this->mPassword );
                $template->set( 'retype', $this->mRetype );