Merge "Use User::equals() where applicable in the class"
[lhc/web/wiklou.git] / 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;