From 4c6b779a0ea20e46c979bb82a230288070ac51bd Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Tue, 25 Sep 2007 04:25:48 +0000 Subject: [PATCH] Show the right message on account creation when the user is blocked. --- RELEASE-NOTES | 1 + includes/SpecialUserlogin.php | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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(); -- 2.20.1