This probably went unnoticed for so long because expired blocks are
regularly cleared as long as new blocks continue being issued, so people
found that the problem "fixed" itself.
Bug: T206944
Change-Id: I6559e1ec23f4469d19684b4d931913acbccb56d4
* @return void
*/
public function showHiddenUsersAddBlockInfo( $showBlockInfo ) {
+ $db = $this->getDB();
+
$this->addTables( 'ipblocks' );
$this->addJoinConds( [
- 'ipblocks' => [ 'LEFT JOIN', 'ipb_user=user_id' ],
+ 'ipblocks' => [ 'LEFT JOIN', [
+ 'ipb_user=user_id',
+ 'ipb_expiry > ' . $db->addQuotes( $db->timestamp() ),
+ ] ],
] );
$this->addFields( 'ipb_deleted' );