From: Alexandre Emsenhuber Date: Sat, 12 Jan 2013 18:21:04 +0000 (+0100) Subject: Don't apply IP blocks to users with "ipblock-exempt" rights when creating an account X-Git-Tag: 1.31.0-rc.0~21050^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22lang_raccourcis%22%2C%22module=%24nom_module%22%29%20.%20%22?a=commitdiff_plain;h=9055e91f227d032139dec05c03fed7b4089d5167;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' )