mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 13:30:55 +01:00
When rendering the "you were invited" header, query the inviting user with the omnipotent viewer
Summary: Fixes T11982. If an install is not public, the registering user may not be able to see the inviting user. Test Plan: {F2097656} Reviewers: chad Reviewed By: chad Maniphest Tasks: T11982 Differential Revision: https://secure.phabricator.com/D17015
This commit is contained in:
parent
9017bb9925
commit
9c72c1b1da
1 changed files with 5 additions and 1 deletions
|
@ -259,8 +259,12 @@ abstract class PhabricatorAuthController extends PhabricatorController {
|
||||||
protected function renderInviteHeader(PhabricatorAuthInvite $invite) {
|
protected function renderInviteHeader(PhabricatorAuthInvite $invite) {
|
||||||
$viewer = $this->getViewer();
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
|
// Since the user hasn't registered yet, they may not be able to see other
|
||||||
|
// user accounts. Load the inviting user with the omnipotent viewer.
|
||||||
|
$omnipotent_viewer = PhabricatorUser::getOmnipotentUser();
|
||||||
|
|
||||||
$invite_author = id(new PhabricatorPeopleQuery())
|
$invite_author = id(new PhabricatorPeopleQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($omnipotent_viewer)
|
||||||
->withPHIDs(array($invite->getAuthorPHID()))
|
->withPHIDs(array($invite->getAuthorPHID()))
|
||||||
->needProfileImage(true)
|
->needProfileImage(true)
|
||||||
->executeOne();
|
->executeOne();
|
||||||
|
|
Loading…
Reference in a new issue