Use User->isRegistered(), not deprecated isLoggedIn()
Bug: T270450 Change-Id: Ibeb882b8917f43aed9fd2411a6d4a2400532da33
This commit is contained in:
committed by
jenkins-bot
parent
dcc067c59f
commit
9fc9dbafa3
@@ -17,7 +17,7 @@
|
|||||||
"descriptionmsg": "uls-desc",
|
"descriptionmsg": "uls-desc",
|
||||||
"license-name": "GPL-2.0-or-later OR MIT",
|
"license-name": "GPL-2.0-or-later OR MIT",
|
||||||
"requires": {
|
"requires": {
|
||||||
"MediaWiki": ">= 1.33.0"
|
"MediaWiki": ">= 1.34.0"
|
||||||
},
|
},
|
||||||
"Hooks": {
|
"Hooks": {
|
||||||
"BeforePageDisplay": "UniversalLanguageSelectorHooks::addModules",
|
"BeforePageDisplay": "UniversalLanguageSelectorHooks::addModules",
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ class UniversalLanguageSelectorHooks {
|
|||||||
public static function addVariables( array &$vars, OutputPage $out ) {
|
public static function addVariables( array &$vars, OutputPage $out ) {
|
||||||
// Place request context dependent stuff here
|
// Place request context dependent stuff here
|
||||||
$user = $out->getUser();
|
$user = $out->getUser();
|
||||||
$loggedIn = $user->isLoggedIn();
|
$loggedIn = $user->isRegistered();
|
||||||
|
|
||||||
// Do not output accept languages if there is risk it will get cached across requests
|
// Do not output accept languages if there is risk it will get cached across requests
|
||||||
if ( $out->getConfig()->get( 'ULSAnonCanChangeLanguage' ) || $loggedIn ) {
|
if ( $out->getConfig()->get( 'ULSAnonCanChangeLanguage' ) || $loggedIn ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user