mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Minor, fail gracefully if there are data integrity problems until I can fix oauth transactions.
This commit is contained in:
parent
a9cee4e923
commit
79e8a637c2
1 changed files with 6 additions and 1 deletions
|
@ -75,9 +75,14 @@ final class PhabricatorPeopleQuery extends PhabricatorOffsetPagedQuery {
|
||||||
mpull($users, 'getPHID'));
|
mpull($users, 'getPHID'));
|
||||||
$emails = mpull($emails, null, 'getUserPHID');
|
$emails = mpull($emails, null, 'getUserPHID');
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
|
// Fail gracefully if we have data integrity problems.
|
||||||
|
if (empty($emails[$user->getPHID()])) {
|
||||||
|
$user->attachPrimaryEmail(new PhabricatorUserEmail());
|
||||||
|
} else {
|
||||||
$user->attachPrimaryEmail($emails[$user->getPHID()]);
|
$user->attachPrimaryEmail($emails[$user->getPHID()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $users;
|
return $users;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue