misc_pterodactyl-panel/app/Http/Middleware/Activity/AccountSubject.php
2023-02-23 12:30:16 -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);
}
}