Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/query/PhabricatorPeopleQuery.php
Show First 20 Lines • Show All 306 Lines • ▼ Show 20 Lines | protected function buildWhereClause(AphrontDatabaseConnection $conn_r) { | ||||
if ($this->dateCreatedBefore) { | if ($this->dateCreatedBefore) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn_r, | $conn_r, | ||||
'user.dateCreated <= %d', | 'user.dateCreated <= %d', | ||||
$this->dateCreatedBefore); | $this->dateCreatedBefore); | ||||
} | } | ||||
if ($this->isAdmin) { | if ($this->isAdmin !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn_r, | $conn_r, | ||||
'user.isAdmin = 1'); | 'user.isAdmin = %d', | ||||
(int)$this->isAdmin); | |||||
} | } | ||||
if ($this->isDisabled !== null) { | if ($this->isDisabled !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn_r, | $conn_r, | ||||
'user.isDisabled = %d', | 'user.isDisabled = %d', | ||||
(int)$this->isDisabled); | (int)$this->isDisabled); | ||||
} | } | ||||
if ($this->isApproved !== null) { | if ($this->isApproved !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn_r, | $conn_r, | ||||
'user.isApproved = %d', | 'user.isApproved = %d', | ||||
(int)$this->isApproved); | (int)$this->isApproved); | ||||
} | } | ||||
if ($this->isSystemAgent) { | if ($this->isSystemAgent !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn_r, | $conn_r, | ||||
'user.isSystemAgent = 1'); | 'user.isSystemAgent = %d', | ||||
(int)$this->isSystemAgent); | |||||
} | } | ||||
if (strlen($this->nameLike)) { | if (strlen($this->nameLike)) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn_r, | $conn_r, | ||||
'user.username LIKE %~ OR user.realname LIKE %~', | 'user.username LIKE %~ OR user.realname LIKE %~', | ||||
$this->nameLike, | $this->nameLike, | ||||
$this->nameLike); | $this->nameLike); | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |