Page MenuHomec4science

20130530.sessionhash.php
No OneTemporary

File Metadata

Created
Sat, Nov 30, 04:41

20130530.sessionhash.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();

Event Timeline