Page MenuHomec4science

20140410.accountsecret.2.php
No OneTemporary

File Metadata

Created
Sat, Nov 23, 06:20

20140410.accountsecret.2.php

<?php
echo pht('Updating users...')."\n";
foreach (new LiskMigrationIterator(new PhabricatorUser()) as $user) {
$id = $user->getID();
echo pht('Updating %d...', $id)."\n";
if (strlen($user->getAccountSecret())) {
continue;
}
queryfx(
$user->establishConnection('w'),
'UPDATE %T SET accountSecret = %s WHERE id = %d',
$user->getTableName(),
Filesystem::readRandomCharacters(64),
$id);
}
echo pht('Done.')."\n";

Event Timeline