mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 18:52:42 +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();
|