Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94990730
PhabricatorAuthSessionGarbageCollector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Dec 11, 23:55
Size
638 B
Mime Type
text/x-php
Expires
Fri, Dec 13, 23:55 (2 d)
Engine
blob
Format
Raw Data
Handle
22876548
Attached To
rPH Phabricator
PhabricatorAuthSessionGarbageCollector.php
View Options
<?php
final
class
PhabricatorAuthSessionGarbageCollector
extends
PhabricatorGarbageCollector
{
const
COLLECTORCONST
=
'auth.sessions'
;
public
function
getCollectorName
()
{
return
pht
(
'Authentication Sessions'
);
}
public
function
hasAutomaticPolicy
()
{
return
true
;
}
protected
function
collectGarbage
()
{
$session_table
=
new
PhabricatorAuthSession
();
$conn_w
=
$session_table
->
establishConnection
(
'w'
);
queryfx
(
$conn_w
,
'DELETE FROM %T WHERE sessionExpires <= UNIX_TIMESTAMP() LIMIT 100'
,
$session_table
->
getTableName
());
return
(
$conn_w
->
getAffectedRows
()
==
100
);
}
}
Event Timeline
Log In to Comment