Fired while a registration is being processed, before the profile is created, so that an app can refuse it. Mirrors the contract ShoppingCartEvent.createBeforeCheckoutEvent already uses for checkout: a listener that objects adds an error message, and a non-empty list aborts the operation. Registration had no equivalent, which is why this exists. This event is always dispatched synchronously within the request that is registering, and can never be queued - the whole point of it is that the caller waits for the answer. That is why it carries live entities rather than ids: there is no possibility of a handler seeing them in a different session, and a fraud rule asking about the target group should not have to re-resolve it.

Implements: CommonAppEvent


Properties

PropertyReturnsDescription
emailStringThe submitted email address. There is no profile yet, so this is the only place to read it from.
errorMessagesList<String>The reasons this registration should be refused, accumulated by calls to addErrorMessage.
groupGroupThe group being registered into.
ipAddressStringThe client IP address the registration request came from.
parametersMap<String,String>The submitted form parameters, so a listener can read fields this event does not name explicitly.
userNameStringThe username that will be created.
websiteWebsiteThe website the registration was submitted on.

Methods

getWebsite()

Returns: Website

The website the registration was submitted on.

getGroup()

Returns: Group

The group being registered into.

getEmail()

Returns: String

The submitted email address. There is no profile yet, so this is the only place to read it from.

getUserName()

Returns: String

The username that will be created.

getIpAddress()

Returns: String

The client IP address the registration request came from.

getParameters()

Returns: Map<String,String>

The submitted form parameters, so a listener can read fields this event does not name explicitly.

getErrorMessages()

Returns: List<String>

The reasons this registration should be refused, accumulated by calls to addErrorMessage.

addErrorMessage(String s)

Returns: void

Refuse this registration. Any message added here aborts the registration and is shown to the person registering, so it must be safe to show them.

ParameterDescription
sthe reason, shown to the user. Must not be blank
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.