diff --git a/extensions/package-manager/src/Command/UpdateExtensionHandler.php b/extensions/package-manager/src/Command/UpdateExtensionHandler.php index 11f4f0b5e..34d143a67 100755 --- a/extensions/package-manager/src/Command/UpdateExtensionHandler.php +++ b/extensions/package-manager/src/Command/UpdateExtensionHandler.php @@ -85,7 +85,7 @@ class UpdateExtensionHandler } $this->events->dispatch( - new Updated($extension) + new Updated($command->actor, $extension) ); return true; diff --git a/extensions/package-manager/src/Extension/Event/Updated.php b/extensions/package-manager/src/Extension/Event/Updated.php index 879e3df2e..61c9e55ec 100755 --- a/extensions/package-manager/src/Extension/Event/Updated.php +++ b/extensions/package-manager/src/Extension/Event/Updated.php @@ -10,16 +10,23 @@ namespace Flarum\PackageManager\Extension\Event; use Flarum\Extension\Extension; +use Flarum\User\User; class Updated { + /** + * @var User + */ + public $actor; + /** * @var Extension */ public $extension; - public function __construct(Extension $extension) + public function __construct(User $actor, Extension $extension) { + $this->actor = $actor; $this->extension = $extension; } }