@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<?php
2
3echo pht('Indexing username tokens for typeaheads...')."\n";
4
5$table = new PhabricatorUser();
6$table->openTransaction();
7$table->beginReadLocking();
8
9$users = $table->loadAll();
10echo pht('%d users to index', count($users));
11foreach ($users as $user) {
12 $user->updateNameTokens();
13 echo '.';
14}
15
16$table->endReadLocking();
17$table->saveTransaction();
18echo "\n".pht('Done.')."\n";