2014-04-10 20:45:10 +02:00
|
|
|
<?php
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Updating users...')."\n";
|
2014-04-10 20:45:10 +02:00
|
|
|
|
|
|
|
foreach (new LiskMigrationIterator(new PhabricatorUser()) as $user) {
|
|
|
|
$id = $user->getID();
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Updating %d...', $id)."\n";
|
2014-04-10 20:45:10 +02:00
|
|
|
|
|
|
|
if (strlen($user->getAccountSecret())) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
queryfx(
|
|
|
|
$user->establishConnection('w'),
|
|
|
|
'UPDATE %T SET accountSecret = %s WHERE id = %d',
|
|
|
|
$user->getTableName(),
|
|
|
|
Filesystem::readRandomCharacters(64),
|
|
|
|
$id);
|
|
|
|
}
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Done.')."\n";
|