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>
Thu, 21 Mar 2019 18:22:28 +0000 (18:22 +0000)
commit61a7a5463de9c4d1073f3c0fd17b35b797923c2d
tree7a4949d08784532b22e1e14cf1a16c207131dc9f
parent6962c2ca9c3051de7a6ac9a7bb502896738e4db6
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