Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/257824
Change subject: Use CentralIdLookup instead of LoadGlobalUserPage hook
......................................................................
Use CentralIdLookup instead of LoadGlobalUserPage hook
The LoadGlobalUserPage hook was always a hack to be non-CentralAuth
specific, but we no longer need it because CentralIdLookup now exists!
Change-Id: I18ececd8e8c67e6135e307993fdc76096e7d8d34
---
M GlobalUserPage.body.php
1 file changed, 4 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUserPage
refs/changes/24/257824/1
diff --git a/GlobalUserPage.body.php b/GlobalUserPage.body.php
index c47d8c9..bd60d45 100644
--- a/GlobalUserPage.body.php
+++ b/GlobalUserPage.body.php
@@ -129,11 +129,10 @@
}
}
- // Allow for authorization extensions to determine
- // whether User:A@foowiki === User:A@centralwiki.
- // This hook intentionally functions the same
- // as the one in Extension:GlobalCssJs.
- if ( !Hooks::run( 'LoadGlobalUserPage', array( $user,
$wgGlobalUserPageDBname, wfWikiID() ) ) ) {
+ // Make sure that the username represents the same
+ // user on both wikis.
+ $lookup = CentralIdLookup::factory();
+ if ( !$lookup->isAttached( $user ) || !$lookup->isAttached(
$user, $wgGlobalUserPageDBname ) ) {
self::$displayCache->set( $text, false );
return false;
}
--
To view, visit https://gerrit.wikimedia.org/r/257824
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I18ececd8e8c67e6135e307993fdc76096e7d8d34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalUserPage
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits