This section describes how to configure double opt-in self-registration for new users in structr.conf.

You can define custom properties to be set on the newly created user at creation time included in the POST request. This only works with the following setting in structr.conf: JsonRestServlet.user.autocreate = true

Registration.customUserAttributes = eMail

Note: The eMail attribute is mandatory and necessary to send out e-mails. It will always be included, so removing it here has no effect. It’s a generally a bad idea to include security-relevant attributes here as they can be set from an unauthenticated, unauthorized source. If unsure or you don’t know what that means, set only eMail.

To allow users to login even before the opt-in confirmation was received, set the following parameter to true. This is typically done when your login workflow allows registering users to set an inital password on the registration page.

Registration.allowLoginBeforeConfirmation = false

You can define a custom class to be created for new users upon registration:

Registration.customUserClass = User


Related Articles
About this article
Last change 2019-01-18
Topics Structr 2.0