Index: includes/SpecialUserrights.php
===================================================================
--- includes/SpecialUserrights.php	(revision 32202)
+++ includes/SpecialUserrights.php	(working copy)
@@ -173,10 +173,26 @@
 
 		if( $newGroups != $oldGroups ) {
 			$log = new LogPage( 'rights' );
-
+			
+			// Fix for interwiki userrights changes
+			$parts = explode( '@', $username );
+			if( count( $parts ) >= 2 ) {
+				global $wgServer;
+				regex_match( '/^([^@]*)@(.*)$/', $username, $matches );
+				regex_match( '/^(...?)(wik.*)$/', $matches[2], $iwparts );
+				$target = new Title();
+				$target->mInterwiki = ( $iwparts[2] == 'wiki' ) ? 'w' : $iwparts[2];
+				$target->mFragment = '';
+				$target->mNamespace = NS_USER;
+				$target->mUrlform = wfUrlencode( str_replace( ' ', '_', $matches[1] ) );
+				$target->mTextform = str_replace( '_', ' ', $matches[1] );
+			} else {
+				$target = $user->getUserPage();
+			}
+			
 			global $wgRequest;
 			$log->addEntry( 'rights',
-				$user->getUserPage(),
+				$target,
 				$wgRequest->getText( 'user-reason' ),
 				array(
 					$this->makeGroupNameList( $oldGroups ),
