Path: blob/master/src/applications/auth/revoker/PhabricatorAuthSessionRevoker.php
12256 views
<?php12final class PhabricatorAuthSessionRevoker3extends PhabricatorAuthRevoker {45const REVOKERKEY = 'session';67public function getRevokerName() {8return pht('Sessions');9}1011public function getRevokerDescription() {12return pht(13"Revokes all active login sessions.\n\n".14"Affected users will be logged out and need to log in again.");15}1617public function revokeAllCredentials() {18$table = new PhabricatorAuthSession();19$conn = $table->establishConnection('w');2021queryfx(22$conn,23'DELETE FROM %T',24$table->getTableName());2526return $conn->getAffectedRows();27}2829public function revokeCredentialsFrom($object) {30$table = new PhabricatorAuthSession();31$conn = $table->establishConnection('w');3233queryfx(34$conn,35'DELETE FROM %T WHERE userPHID = %s',36$table->getTableName(),37$object->getPHID());3839return $conn->getAffectedRows();40}4142}434445