@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('Updating users...')."\n";
4
5foreach (new LiskMigrationIterator(new PhabricatorUser()) as $user) {
6 $id = $user->getID();
7 echo pht('Updating %d...', $id)."\n";
8
9 if (strlen($user->getAccountSecret())) {
10 continue;
11 }
12
13 queryfx(
14 $user->establishConnection('w'),
15 'UPDATE %T SET accountSecret = %s WHERE id = %d',
16 $user->getTableName(),
17 Filesystem::readRandomCharacters(64),
18 $id);
19}
20
21echo pht('Done.')."\n";