From 9055e91f227d032139dec05c03fed7b4089d5167 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 12 Jan 2013 19:21:04 +0100 Subject: [PATCH] Don't apply IP blocks to users with "ipblock-exempt" rights when creating an account So that this check is consistent with the one in User::getBlockedStatus(). Change-Id: Ibcadb15b87794cfe59fc42d862728e5fd46c3413 --- includes/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/User.php b/includes/User.php index ed3fe7630f..c71bec606c 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3188,7 +3188,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' ) -- 2.20.1