# signup

Source: https://zotonic.com/docs/2257/signup

URI: https://zotonic.com/id/2257

Language: en



Exported APIs:

- `model/signup/get/confirm_redirect` return the URL for redirecting the current user after a signup.
  
  Calls the `#signup_confirm_redirect{ id = UserId, request_page = RequestPage }` notification. The first observer result overrides the requested destination; otherwise signup uses that destination, the user's page, or the home page. All destinations are constrained to the current site. This model GET is public and only resolves a destination for the current user; it consumes no state.
- `confirm_redirect/2` also accepts a requested destination; `/1` passes `undefined`.
- `store_confirm_redirect/3` is an internal, server-side signup API. It stores `signup_ready_page` in the unverified email identities' `propb` maps or proplists, preserving other properties. Callers must already be authorized to create or update the signup. Resending verification mail preserves it.
- `confirm/2` authorizes confirmation with the verification key, publishes and verifies the account, and consumes the pending destination transactionally. It emits `#signup_confirm{}` after commit. Neither mutation is exposed through the model's MQTT/template API.

Available Model API Paths
-------------------------

| Method | Path pattern                        | Description                                                                      |
| ------ | ----------------------------------- | -------------------------------------------------------------------------------- |
| `get`  | `/confirm_redirect/...`             | Return the same-site post-signup URL: notifier result, user `page_url`, or `home`. Public; uses the current user and consumes no pending destination. |
| `get`  | `/config/email_unique/...`          | Return `mod_signup.email_unique` boolean setting (default `true`). If enabled, signup e-mail addresses must be unique among user accounts and must not match another resource's e-mail identity when that identity is marked `is_unique`. Non-account resources with non-unique e-mail identities do not block signup. |
| `get`  | `/config/username_equals_email/...` | Return `mod_signup.username_equals_email` boolean setting (default `true`) indicating whether signup usernames must equal email addresses. |

`/+name` marks a variable path segment. A trailing `/...` means extra path segments are accepted for further lookups.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2257?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2257?language=en>)
