Merge "ForeignWikiRequest: Also check User::isSafeToLoad()"

This commit is contained in:
jenkins-bot 2016-07-19 00:26:38 +00:00 committed by Gerrit Code Review
commit e463fd81a9

View file

@ -38,9 +38,11 @@ class EchoForeignWikiRequest {
}
protected function canUseCentralAuthl() {
global $wgFullyInitialised;
global $wgFullyInitialised, $wgUser;
return $wgFullyInitialised &&
$wgUser->isSafeToLoad() &&
$this->user->isSafeToLoad() &&
SessionManager::getGlobalSession()->getProvider() instanceof CentralAuthSessionProvider &&
$this->getCentralId( $this->user ) !== 0;
}