41 public static function search( $audience, $search, $limit, $offset = 0 ) {
45 $prefix = $user ? $user->getName() :
'';
47 $cond = [
'user_name ' .
$dbr->buildLike( $prefix,
$dbr->anyString() ) ];
51 if ( $audience ===
'public' || !MediaWikiServices::getInstance()
53 ->userHasRight( $audience,
'hideuser' )
55 $tables[] =
'ipblocks';
56 $cond[
'ipb_deleted'] = [ 0, null ];
57 $joinConds[
'ipblocks'] = [
'LEFT JOIN',
'user_id=ipb_user' ];
67 'ORDER BY' =>
'user_name',
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Handles searching prefixes of user names.
static search( $audience, $search, $limit, $offset=0)
Do a prefix search of user names and return a list of matching user names.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.