From: Rob Church Date: Wed, 22 Feb 2006 21:37:18 +0000 (+0000) Subject: (bug 4319) Don't show a "create account" link on the login form when account creation... X-Git-Tag: 1.6.0~303 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=6001a3a0d0aac5212694c623173f8b5362d230f6;p=lhc%2Fweb%2Fwiklou.git (bug 4319) Don't show a "create account" link on the login form when account creation is disabled. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 582a9d80d5..097a9df3f5 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index a9b4d5cd1a..de67fda9db 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -484,9 +484,12 @@ class LoginForm { $link .= wfMsgHtml( $linkmsg . 'link' ); $link .= ''; - $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 );