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:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user