From: Rotem Liss Date: Tue, 25 Sep 2007 04:25:48 +0000 (+0000) Subject: Show the right message on account creation when the user is blocked. X-Git-Tag: 1.31.0-rc.0~51296 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=4c6b779a0ea20e46c979bb82a230288070ac51bd;p=lhc%2Fweb%2Fwiklou.git Show the right message on account creation when the user is blocked. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2bba63b7ba..197bfc4e0a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -70,6 +70,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 8376) Special:Newpages accepts namespace in subpage form * Make input form of Special:Newpages nicer for RTL wikis * Fix namespace selection after submit of Special:Newpages +* Show the right message on account creation when the user is blocked === API changes in 1.12 === diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index 1568ea4d89..7ddb723775 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -228,10 +228,13 @@ class LoginForm { return false; } - # Check anonymous user ($wgUser) limitations : - if (!$wgUser->isAllowedToCreateAccount()) { + # Check permissions + if ( !$wgUser->isAllowed( 'createaccount' ) ) { $this->userNotPrivilegedMessage(); return false; + } elseif ( $wgUser->isBlockedFromCreateAccount() ) { + $this->userBlockedMessage(); + return false; } $ip = wfGetIP();