2013-05-31 02:30:06 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$table = new PhabricatorUser();
|
|
|
|
$table->openTransaction();
|
|
|
|
$conn = $table->establishConnection('w');
|
|
|
|
|
|
|
|
$sessions = queryfx_all(
|
|
|
|
$conn,
|
|
|
|
'SELECT userPHID, type, sessionKey FROM %T FOR UPDATE',
|
|
|
|
PhabricatorUser::SESSION_TABLE);
|
|
|
|
|
|
|
|
foreach ($sessions as $session) {
|
|
|
|
queryfx(
|
|
|
|
$conn,
|
|
|
|
'UPDATE %T SET sessionKey = %s WHERE userPHID = %s AND type = %s',
|
|
|
|
PhabricatorUser::SESSION_TABLE,
|
2017-04-06 19:08:46 +02:00
|
|
|
PhabricatorHash::weakDigest($session['sessionKey']),
|
2013-05-31 02:30:06 +02:00
|
|
|
$session['userPHID'],
|
|
|
|
$session['type']);
|
|
|
|
}
|
|
|
|
|
|
|
|
$table->saveTransaction();
|