Merge "Use User::equals() where applicable in the class"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 18 Sep 2015 09:08:27 +0000 (09:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 18 Sep 2015 09:08:27 +0000 (09:08 +0000)
includes/User.php

index dbcbe31..6df41ee 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;