Show the right message on account creation when the user is blocked.
authorRotem Liss <rotem@users.mediawiki.org>
Tue, 25 Sep 2007 04:25:48 +0000 (04:25 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Tue, 25 Sep 2007 04:25:48 +0000 (04:25 +0000)
RELEASE-NOTES
includes/SpecialUserlogin.php

index 2bba63b..197bfc4 100644 (file)
@@ -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 ===
 
index 1568ea4..7ddb723 100644 (file)
@@ -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();