@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Correctly attach users to identities

Summary: This never worked.

Test Plan: Ran `bin/repository rebuild-identities` and viewed identity objects with `currentEffectiveUserID`s and no longer got errors about attempting to attach `null` objects instead of `PhabricatorUser` objects.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D19495

+21
+21
src/applications/repository/query/PhabricatorRepositoryIdentityQuery.php
··· 124 124 return $where; 125 125 } 126 126 127 + protected function didFilterPage(array $identities) { 128 + $user_ids = array_filter( 129 + mpull($identities, 'getCurrentEffectiveUserPHID', 'getID')); 130 + if (!$user_ids) { 131 + return $identities; 132 + } 133 + 134 + $users = id(new PhabricatorUser())->loadAllWhere( 135 + 'phid IN (%Ls)', $user_ids); 136 + $users = mpull($users, null, 'getPHID'); 137 + 138 + foreach ($identities as $identity) { 139 + if ($identity->hasEffectiveUser()) { 140 + $user = idx($users, $identity->getCurrentEffectiveUserPHID()); 141 + $identity->attachEffectiveUser($user); 142 + } 143 + } 144 + 145 + return $identities; 146 + } 147 + 127 148 public function getQueryApplicationClass() { 128 149 return 'PhabricatorDiffusionApplication'; 129 150 }