Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / resources / sql / autopatches / 20140410.accountsecret.2.php
blob7d0cf7ad884fa57dd3e63a5fa0e0d11c8201176d
1 <?php
3 echo pht('Updating users...')."\n";
5 foreach (new LiskMigrationIterator(new PhabricatorUser()) as $user) {
6 $id = $user->getID();
7 echo pht('Updating %d...', $id)."\n";
9 if (strlen($user->getAccountSecret())) {
10 continue;
13 queryfx(
14 $user->establishConnection('w'),
15 'UPDATE %T SET accountSecret = %s WHERE id = %d',
16 $user->getTableName(),
17 Filesystem::readRandomCharacters(64),
18 $id);
21 echo pht('Done.')."\n";