Force the target user ID to be the correct foreign ID on the relevant local wikis...
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 28 Feb 2012 02:04:30 +0000 (02:04 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 28 Feb 2012 02:04:30 +0000 (02:04 +0000)
includes/Block.php

index c258dd2..522316f 100644 (file)
@@ -71,6 +71,9 @@ class Block {
                }
 
                $this->setTarget( $address );
+               if ( $this->target instanceof User && $user ) {
+                       $this->target->setId( $user ); // needed for foreign users
+               }
                if ( $by ) { // local user
                        $this->setBlocker( User::newFromID( $by ) );
                } else { // foreign user