From 5668f2347a65dda85fca5addd7cfc5f61db14717 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Roszka?= Date: Thu, 20 Aug 2015 08:20:30 +0200 Subject: [PATCH] Use User::equals() where applicable in the class It is a minor cleanup operation. I replaced a comparison of user 'mId' with a corresponding 'User::equals()' call. Change-Id: I89dea55789f343e794429c38934c263168ef608d --- includes/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/User.php b/includes/User.php index 9b958f42dd..fddceab31d 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1591,7 +1591,7 @@ class User implements IDBAccessObject { # We only need to worry about passing the IP address to the Block generator if the # user is not immune to autoblocks/hardblocks, and they are the current user so we # know which IP address they're actually coming from - if ( !$this->isAllowed( 'ipblock-exempt' ) && $this->getID() == $wgUser->getID() ) { + if ( !$this->isAllowed( 'ipblock-exempt' ) && $this->equals( $wgUser ) ) { $ip = $this->getRequest()->getIP(); } else { $ip = null; -- 2.20.1