User: Fully clear instance variables when loading not-blocked status
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 22 Mar 2018 16:52:59 +0000 (12:52 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 22 Mar 2018 19:01:28 +0000 (15:01 -0400)
commitf34423130fee55974a5aec783cd34a213802bd1c
tree11018b5936548e517bfcb4270e4d5ad6dfdc8fab
parente4277f170be4cb8aee0fe407793db47a94ec24c2
User: Fully clear instance variables when loading not-blocked status

If a block is deleted and ->clearInstanceCache() is called to try to
make an existing User object reflect that fact, some methods are still
reflecting the old block.

To fix this, User::getBlockedStatus() needs to clear all the relevant
instance variables if the user is found not to be blocked.

Change-Id: I6ad8d5555a4c8519336aded3067e5034831dadf3
includes/user/User.php
tests/phpunit/includes/user/UserTest.php