mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 07:50:57 +01:00
23 lines
532 B
PHP
23 lines
532 B
PHP
|
<?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,
|
||
|
PhabricatorHash::digest($session['sessionKey']),
|
||
|
$session['userPHID'],
|
||
|
$session['type']);
|
||
|
}
|
||
|
|
||
|
$table->saveTransaction();
|