From be4f26f8dadc87e5ab4ba47715078e5bab8f5c65 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 26 Feb 2011 13:28:02 +0000 Subject: [PATCH] Don't even try to get user's IP address if he has 'ipblock-exempt' right --- includes/User.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/includes/User.php b/includes/User.php index 63408157bc..4ae4042044 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1116,7 +1116,10 @@ class User { $this->mAllowUsertalk = 0; # Check if we are looking at an IP or a logged-in user - if ( $this->isIP( $this->getName() ) ) { + if ( $this->isAllowed( 'ipblock-exempt' ) ) { + # Exempt from all types of IP-block + $ip = ''; + } elseif ( $this->isIP( $this->getName() ) ) { $ip = $this->getName(); } else { # Check if we are looking at the current user @@ -1130,11 +1133,6 @@ class User { } } - if ( $this->isAllowed( 'ipblock-exempt' ) ) { - # Exempt from all types of IP-block - $ip = ''; - } - # User/IP blocking $this->mBlock = new Block(); $this->mBlock->fromMaster( !$bFromSlave ); -- 2.20.1