Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2894386
PhabricatorAuthTemporaryTokenGarbageCollector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
646 B
Referenced Files
None
Subscribers
None
PhabricatorAuthTemporaryTokenGarbageCollector.php
View Options
<?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
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 19:49 (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128141
Default Alt Text
PhabricatorAuthTemporaryTokenGarbageCollector.php (646 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment