class RegisterUserHandler

Traits

Properties

protected Dispatcher $events from DispatchEventsTrait
protected SettingsRepositoryInterface $settings
protected UserValidator $validator
protected AvatarUploader $avatarUploader

Methods

dispatchEventsFor(object $entity, User $actor = null)

<p>Dispatch all events for an entity.</p>

__construct(Dispatcher $events, SettingsRepositoryInterface $settings, UserValidator $validator, AvatarUploader $avatarUploader)

No description

handle(RegisterUser $command)

No description

Details

dispatchEventsFor(object $entity, User $actor = null)

<p>Dispatch all events for an entity.</p>

Parameters

object $entity
User $actor

__construct(Dispatcher $events, SettingsRepositoryInterface $settings, UserValidator $validator, AvatarUploader $avatarUploader)

Parameters

Dispatcher $events
SettingsRepositoryInterface $settings
UserValidator $validator
AvatarUploader $avatarUploader

User handle(RegisterUser $command)

Parameters

RegisterUser $command

Return Value

User

Exceptions

PermissionDeniedException

if signup is closed and the actor is not an administrator.

ValidationException