Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorLogoutController.php
Show All 17 Lines | final class PhabricatorLogoutController | ||||
} | } | ||||
public function processRequest() { | public function processRequest() { | ||||
$request = $this->getRequest(); | $request = $this->getRequest(); | ||||
$user = $request->getUser(); | $user = $request->getUser(); | ||||
if ($request->isFormPost()) { | if ($request->isFormPost()) { | ||||
$log = PhabricatorUserLog::newLog( | $log = PhabricatorUserLog::initializeNewLog( | ||||
$user, | |||||
$user, | $user, | ||||
$user->getPHID(), | |||||
PhabricatorUserLog::ACTION_LOGOUT); | PhabricatorUserLog::ACTION_LOGOUT); | ||||
$log->save(); | $log->save(); | ||||
// Destroy the user's session in the database so logout works even if | // Destroy the user's session in the database so logout works even if | ||||
// their cookies have some issues. We'll detect cookie issues when they | // their cookies have some issues. We'll detect cookie issues when they | ||||
// try to login again and tell them to clear any junk. | // try to login again and tell them to clear any junk. | ||||
$phsid = $request->getCookie('phsid'); | $phsid = $request->getCookie('phsid'); | ||||
if ($phsid) { | if ($phsid) { | ||||
Show All 24 Lines |