Use User::equals() where applicable in the class
authorMichał Roszka <michal@roszka.pl>
Thu, 20 Aug 2015 06:20:30 +0000 (08:20 +0200)
committerLegoktm <legoktm.wikipedia@gmail.com>
Fri, 18 Sep 2015 08:54:28 +0000 (08:54 +0000)
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

index 9b958f4..fddceab 100644 (file)
@@ -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;