From c88394e036cb1fcafb1095e62dcab0f80547c07f Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 2 Jul 2008 14:40:48 +0000 Subject: [PATCH] (bug 14698) Make "Block account creation" work as advertised. :) --- RELEASE-NOTES | 2 ++ includes/specials/SpecialUserlogin.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 081978e3da..06083122ea 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -407,6 +407,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14687) OutputPage::addStyle() now adds type="text/css" like it should. * OpenSearch cleanup; Firefox now sends you to the search page for empty searches instead of the domain root (which may not even be a wiki). +* (bug 14698) Blocks without "block account creation" set no longer block + account creation. === API changes in 1.13 === diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 179ef3f9d2..d311783b31 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -727,7 +727,9 @@ class LoginForm { } elseif ( $wgUser->isBlockedFromCreateAccount() ) { $this->userBlockedMessage(); return; - } elseif ( count( $permErrors = $titleObj->getUserPermissionsErrors( 'createaccount', $wgUser, true ) )>0 ) { + } + // Supress 'blockedtext' error here, we already checked above. + elseif ( count( $permErrors = $titleObj->getUserPermissionsErrors( 'createaccount', $wgUser, true, array('blockedtext') ) )>0 ) { $wgOut->showPermissionsErrorPage( $permErrors, 'createaccount' ); return; } -- 2.20.1