$fields = [ 'img_name', 'img_user', 'img_timestamp' ];
$options = [];
+ $user = $opts->getValue( 'user' );
+ if ( $user !== '' ) {
+ $userId = User::idFromName( $user );
+ if ( $userId ) {
+ $conds['img_user'] = $userId;
+ } else {
+ $conds['img_user_text'] = $user;
+ }
+ }
+
if ( !$opts->getValue( 'showbots' ) ) {
$groupsWithBotPermission = User::getGroupsWithPermission( 'bot' );
[
'ug_group' => $groupsWithBotPermission,
'ug_user = img_user',
- $this->getConfig()->get( 'DisableUserGroupExpiry' ) ?
- '1' :
- 'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() )
+ 'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() )
]
];
}