r17019 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17018‎ | r17019 | r17020 >
Date:06:36, 15 October 2006
Author:tstarling
Status:old
Tags:
Comment:
Always grant access to Special:Userlogin, even if the user can't create an account. Creating an account isn't the only thing Special:Userlogin is for.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -1160,10 +1160,11 @@
11611161 } else {
11621162 global $wgWhitelistRead;
11631163
1164 - /** If anon users can create an account,
1165 - they need to reach the login page first! */
1166 - if( $wgUser->isAllowed( 'createaccount' )
1167 - && $this->getNamespace() == NS_SPECIAL
 1164+ /**
 1165+ * Always grant access to the login page.
 1166+ * Even anons need to be able to log in.
 1167+ */
 1168+ if( $this->getNamespace() == NS_SPECIAL
11681169 && $this->getText() == 'Userlogin' ) {
11691170 return true;
11701171 }