misc_pterodactyl-panel/app/Http/Middleware/Activity/AccountSubject.php
Matthew Penner 3ea6d45cda
php-cs-fixer
2022-11-29 10:53:59 -07:00

21 lines
498 B
PHP

<?php
namespace Pterodactyl\Http\Middleware\Activity;
use Illuminate\Http\Request;
use Pterodactyl\Facades\LogTarget;
class AccountSubject
{
/**
* Sets the actor and default subject for all requests passing through this
* middleware to be the currently logged in user.
*/
public function handle(Request $request, \Closure $next)
{
LogTarget::setActor($request->user());
LogTarget::setSubject($request->user());
return $next($request);
}
}