Support conditional user defaults

Thanks to T321527, MediaWiki makes it possible for default
values of user properties to vary by user.

Depends-On: I1549c3137e66801c85e03e46427e27da333d68e2
Bug: T354329
Change-Id: Ib7c80f0b065617f9e76315eb4a652486681247cc
This commit is contained in:
Martin Urbanec 2024-01-04 13:12:03 +01:00
parent 7cd24be30e
commit aa13694fea

View file

@ -22,7 +22,10 @@ class CentralAuthHooks implements CentralAuthIsUIReloadRecommendedHook {
* @inheritDoc
*/
public function onCentralAuthIsUIReloadRecommended( User $user, bool &$recommendReload ) {
if ( $this->userOptionsLookup->getDefaultOption( 'skin' ) === Constants::SKIN_NAME_MODERN ) {
if (
$this->userOptionsLookup->getDefaultOption( 'skin', $user ) ===
Constants::SKIN_NAME_MODERN
) {
// Vector 2022 does not support updating the UI without reloading the page (T345112)
$recommendReload = true;
}