User: Remove useless check from deprecated isBlocked method

Remove call to AbstractBlock::appliesToRight, because it always
returns true for 'edit', so checking it is equivalent to adding
&& true.

Although this method is deprecated, this is worth tidying this up
since it is confusing and gets us one step closer to removing the
'edit' case altogether.

Change-Id: I479d6c866ec13a791873042e623fa841dd5bebf2
This commit is contained in:
Thalia 2020-06-24 23:43:11 +01:00
parent 075807151a
commit 9132b2e372

View file

@ -1899,8 +1899,7 @@ class User implements IDBAccessObject, UserIdentity {
* @return bool True if blocked, false otherwise
*/
public function isBlocked( $fromReplica = true ) {
return $this->getBlock( $fromReplica ) instanceof AbstractBlock &&
$this->getBlock()->appliesToRight( 'edit' );
return $this->getBlock( $fromReplica ) instanceof AbstractBlock;
}
/**