Replace $wgUser with RequestContext::getUser in User::getBlockedStatus
authorGergő Tisza <tgr.huwiki@gmail.com>
Mon, 18 Mar 2019 21:50:48 +0000 (14:50 -0700)
committerReedy <reedy@wikimedia.org>
Mon, 18 Mar 2019 23:18:41 +0000 (23:18 +0000)
commit3b0effb20334f19f662aed6760ddfe7d4b43c6d6
treeb7ec342180433e69bf0dd98989c18297f3eb1b17
parent46a08106c09991f7be3f53ba24731acf8469d882
Replace $wgUser with RequestContext::getUser in User::getBlockedStatus

$wgUser is not guaranteed to exist until MediaWiki has been fully
initialized; block status needs to be checked early on for
authentication-related permission checks.

Bug: T218608
Change-Id: I16315c071855024bc0412d5360c95f843420d9a9
includes/user/User.php
tests/phpunit/includes/auth/CheckBlocksSecondaryAuthenticationProviderTest.php
tests/phpunit/includes/user/UserTest.php