3 final class PhabricatorPeopleUserEmailQuery
4 extends PhabricatorCursorPagedPolicyAwareQuery
{
9 public function withIDs(array $ids) {
14 public function withPHIDs(array $phids) {
15 $this->phids
= $phids;
19 public function newResultObject() {
20 return new PhabricatorUserEmail();
23 protected function getPrimaryTableAlias() {
27 protected function buildWhereClauseParts(AphrontDatabaseConnection
$conn) {
28 $where = parent
::buildWhereClauseParts($conn);
30 if ($this->ids
!== null) {
37 if ($this->phids
!== null) {
40 'email.phid IN (%Ls)',
47 protected function willLoadPage(array $page) {
49 $user_phids = mpull($page, 'getUserPHID');
51 $users = id(new PhabricatorPeopleQuery())
52 ->setViewer($this->getViewer())
53 ->setParentQuery($this)
54 ->withPHIDs($user_phids)
56 $users = mpull($users, null, 'getPHID');
58 foreach ($page as $key => $address) {
59 $user = idx($users, $address->getUserPHID());
63 $this->didRejectResult($address);
67 $address->attachUser($user);
73 public function getQueryApplicationClass() {
74 return 'PhabricatorPeopleApplication';