1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00
phorge-phorge/resources/sql/patches/079.nametokenindex.php

19 lines
385 B
PHP
Raw Normal View History

<?php
echo pht('Indexing username tokens for typeaheads...')."\n";
$table = new PhabricatorUser();
$table->openTransaction();
$table->beginReadLocking();
$users = $table->loadAll();
echo pht('%d users to index', count($users));
foreach ($users as $user) {
$user->updateNameTokens();
echo '.';
}
$table->endReadLocking();
$table->saveTransaction();
echo "\n".pht('Done.')."\n";