You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

User Self-Registration

The following pre-defined MailTemplate keys can be used to configure the self-registration process.

Note: The Mail Configuration has to be done for self-registration mails to be sent.

Template Name Used as Default Value
SENDER_ADDRESS The sender address of the registration mail structr-mail-daemon@localhost
SENDER_NAME The sender name of the registration mail Structr Mail Daemon
SUBJECT The subject of the registration mail Welcome to Structr, please finalize registration
TEXT_BODY The plaintext body of the registration mail Go to ${link} to finalize registration.
HTML_BODY The HTML body of the registration mail <div>Click <a href='${link}'>here</a> to finalize registration.</div>
BASE_URL Used to build the link variable ${concat("http://", application.host, ":", application.http.port)} (see structr.conf)
TARGET_PAGE the target parameter value for the redirection target page name register_thanks
ERROR_PAGE the error parameter value for the error redirection target page name register_error

Technical Note: The visibility flags of these mail templates is irrelevant as the self-registration mail is created as a privileged user.

A special link variable is provided for the TEXT_BODY and HTML_BODY templates and can be output with the usual syntax: ${link}.

Example link: https://support.structr.com/confirm_registration?key=<CONFIRM_KEY>&target=/dashboard&onerror=/register-error

Read-only templates for registration

The following templates exist but should not be changed/created as they would interfere with the regular registration process

Template Name Used as Default Value
CONFIRM_REGISTRATION_PAGE Internal page to confirm the registration /confirm_registration
CONFIRM_KEY_KEY The URL parameter key for the confirmation key key
TARGET_PAGE_KEY The URL parameter key for the redirection target page name target
ERROR_PAGE_KEY The URL parameter key for the error redirection target page name onerror

Search results for "User Self-Registration"

List of REST Endpoints

URL Description Supported methods
/structr/rest/_env Structr runtime environment information GET
/structr/rest/_schema Schema information endpoint GET
/structr/rest/_schemaJson Schema JSON output endpoint GET, POST
/structr/rest/cypher Direct Cypher query endpoint GET, POST
/structr/rest/globalSchemaMethods/... Root path for global schema method execution POST
/structr/rest/login Login endpoint POST
/structr/rest/logout Logout endpoint POST
/structr/rest/token JWT endpoint POST
/structr/rest/maintenance Root path for maintenance command execution POST
/structr/rest/registration Endpoint for the User Self-Registration process POST
/structr/rest/reset-password Endpoint for the Reset Password process POST

400 Bad Request: User self-registration is not configured yet, cannot create new user.

You need to enable and configure user self-registration according to https://docs.structr.com/docs/handling-user-sessions#user-self-registration

REST Responses