芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/mctv/lib/Helper/LogoutTrait.php
. */ namespace Xibo\Helper; use Slim\Http\ServerRequest as Request; use Xibo\Entity\User; use Xibo\Service\LogServiceInterface; trait LogoutTrait { public function completeLogoutFlow(User $user, Session $session, LogServiceInterface $log, Request $request) { $user->touch(); unset($_SESSION['userid']); unset($_SESSION['username']); unset($_SESSION['password']); $session->setIsExpired(1); $log->audit('User', $user->userId, 'User logout', [ 'IPAddress' => $request->getAttribute('ip_address'), 'UserAgent' => $request->getHeader('User-Agent') ]); } }