Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / phid / resolver / PhabricatorUserPHIDResolver.php
bloba2a75fe3108dfc83596235019c09741d5bb12758
1 <?php
3 final class PhabricatorUserPHIDResolver
4 extends PhabricatorPHIDResolver {
6 protected function getResolutionMap(array $names) {
7 // Pick up the normalization and case rules from the PHID type query.
9 foreach ($names as $key => $name) {
10 $names[$key] = '@'.$name;
13 $query = id(new PhabricatorObjectQuery())
14 ->setViewer($this->getViewer());
16 $users = id(new PhabricatorPeopleUserPHIDType())
17 ->loadNamedObjects($query, $names);
19 $results = array();
20 foreach ($users as $at_username => $user) {
21 $results[substr($at_username, 1)] = $user->getPHID();
24 return $results;