From: Thalia Date: Mon, 26 Aug 2019 23:21:04 +0000 (+0100) Subject: Use UserIdentity::isRegistered instead of User::isAnon in BlockManager X-Git-Tag: 1.34.0-rc.0~560^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=81f96bee1f753d418fdc3a4f8d83b2c967e84153;p=lhc%2Fweb%2Fwiklou.git Use UserIdentity::isRegistered instead of User::isAnon in BlockManager BlockManager::getBlockFromCookieValue accepts a UserIdentity, so should only call methods defined in that interface. Change-Id: If30df15b800cceee0ad052a2e0524df8b28d9901 --- diff --git a/includes/block/BlockManager.php b/includes/block/BlockManager.php index 948ed930da..83b59c7e59 100644 --- a/includes/block/BlockManager.php +++ b/includes/block/BlockManager.php @@ -257,7 +257,7 @@ class BlockManager { $block = DatabaseBlock::newFromID( $blockCookieId ); if ( $block instanceof DatabaseBlock && - $this->shouldApplyCookieBlock( $block, $user->isAnon() ) + $this->shouldApplyCookieBlock( $block, !$user->isRegistered() ) ) { return $block; }