Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93499444
PhabricatorAuthSessionRevoker.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
Fri, Nov 29, 06:04
Size
941 B
Mime Type
text/x-php
Expires
Sun, Dec 1, 06:04 (2 d)
Engine
blob
Format
Raw Data
Handle
22655268
Attached To
rPH Phabricator
PhabricatorAuthSessionRevoker.php
View Options
<?php
final
class
PhabricatorAuthSessionRevoker
extends
PhabricatorAuthRevoker
{
const
REVOKERKEY
=
'session'
;
public
function
getRevokerName
()
{
return
pht
(
'Sessions'
);
}
public
function
getRevokerDescription
()
{
return
pht
(
"Revokes all active login sessions.
\n\n
"
.
"Affected users will be logged out and need to log in again."
);
}
public
function
revokeAllCredentials
()
{
$table
=
new
PhabricatorAuthSession
();
$conn
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn
,
'DELETE FROM %T'
,
$table
->
getTableName
());
return
$conn
->
getAffectedRows
();
}
public
function
revokeCredentialsFrom
(
$object
)
{
$table
=
new
PhabricatorAuthSession
();
$conn
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn
,
'DELETE FROM %T WHERE userPHID = %s'
,
$table
->
getTableName
(),
$object
->
getPHID
());
return
$conn
->
getAffectedRows
();
}
}
Event Timeline
Log In to Comment