Page MenuHomestyx hydra

PhabricatorAuthTemporaryTokenGarbageCollector.php
No OneTemporary

PhabricatorAuthTemporaryTokenGarbageCollector.php

<?php
final class PhabricatorAuthTemporaryTokenGarbageCollector
extends PhabricatorGarbageCollector {
const COLLECTORCONST = 'auth.tokens';
public function getCollectorName() {
return pht('Authentication Tokens');
}
public function hasAutomaticPolicy() {
return true;
}
protected function collectGarbage() {
$session_table = new PhabricatorAuthTemporaryToken();
$conn_w = $session_table->establishConnection('w');
queryfx(
$conn_w,
'DELETE FROM %T WHERE tokenExpires <= UNIX_TIMESTAMP() LIMIT 100',
$session_table->getTableName());
return ($conn_w->getAffectedRows() == 100);
}
}

File Metadata

Mime Type
text/x-php
Expires
Thu, Feb 6, 1:35 AM (8 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33759
Default Alt Text
PhabricatorAuthTemporaryTokenGarbageCollector.php (646 B)

Event Timeline