Rearrange code in User::getBlockedStatus to avoid isAllowed calls
authorGergő Tisza <tgr.huwiki@gmail.com>
Thu, 21 Mar 2019 16:00:49 +0000 (09:00 -0700)
committerGergő Tisza <tgr.huwiki@gmail.com>
Thu, 21 Mar 2019 16:00:49 +0000 (09:00 -0700)
commit02387b7dc81e7719c4edb96f0806310fbb9f9c1c
tree0f87791decd8d9655a0993d4ed5d493a347ac68b
parentc4124a2625e7f2589f00f5c567e7098057d95348
Rearrange code in User::getBlockedStatus to avoid isAllowed calls

User::isAllowed() triggers session loading, which results in a loop
if it is called during session loading. Session providers need to
check block status when $wgBlockDisablesLogin is enabled, so try to
avoid isAllowed calls in that situation.

Bug: T218608
Change-Id: Iab24923c613d6aeed4b574f587fc4cee8f33077c
includes/user/User.php