mirror of
https://github.com/flarum/core.git
synced 2025-08-08 09:26:34 +02:00
Allow accessing the session via the actor
This is a bit sloppy (might come up with a better solution yet), but since most events provide access to the actor but not the request, this was the easiest/quickest way to allow extensions to access the session.
This commit is contained in:
@@ -28,6 +28,8 @@ class AuthenticateWithSession implements MiddlewareInterface
|
||||
|
||||
$actor = $this->getActor($session);
|
||||
|
||||
$actor->setSession($session);
|
||||
|
||||
$request = $request->withAttribute('actor', $actor);
|
||||
|
||||
return $out ? $out($request, $response) : $response;
|
||||
|
Reference in New Issue
Block a user