3 final class PhabricatorAuthTemporaryTokenGarbageCollector
4 extends PhabricatorGarbageCollector
{
6 const COLLECTORCONST
= 'auth.tokens';
8 public function getCollectorName() {
9 return pht('Authentication Tokens');
12 public function hasAutomaticPolicy() {
16 protected function collectGarbage() {
17 $session_table = new PhabricatorAuthTemporaryToken();
18 $conn_w = $session_table->establishConnection('w');
22 'DELETE FROM %T WHERE tokenExpires <= UNIX_TIMESTAMP() LIMIT 100',
23 $session_table->getTableName());
25 return ($conn_w->getAffectedRows() == 100);