Merge "Don't apply IP blocks to users with "ipblock-exempt" rights when creating...
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 13 Jan 2013 20:31:47 +0000 (20:31 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 13 Jan 2013 20:31:47 +0000 (20:31 +0000)
includes/User.php

index 3c5c114..21f8dd0 100644 (file)
@@ -3289,7 +3289,7 @@ class User {
                # bug 13611: if the IP address the user is trying to create an account from is
                # blocked with createaccount disabled, prevent new account creation there even
                # when the user is logged in
-               if( $this->mBlockedFromCreateAccount === false ){
+               if ( $this->mBlockedFromCreateAccount === false && !$this->isAllowed( 'ipblock-exempt' ) ) {
                        $this->mBlockedFromCreateAccount = Block::newFromTarget( null, $this->getRequest()->getIP() );
                }
                return $this->mBlockedFromCreateAccount instanceof Block && $this->mBlockedFromCreateAccount->prevents( 'createaccount' )