Zoonk.Accounts.User (Zoonk v0.1.0-dev)
View SourceDefines the User
schema.
This schema represents users in the system, storing their email and account confirmation status. It also includes changeset functions for managing user signup, email validation, and account confirmation.
For public information, we use the Zoonk.Accounts.UserProfile
schema instead.
Fields
Field Name | Type | Description |
---|---|---|
year_of_birth | Integer | Year of birth for legal reasons. |
email | String | User's email address. |
language | Ecto.Enum | User's language. |
confirmed_at | DateTime | When the account was confirmed. |
authenticated_at | DateTime | When the user was last authenticated. |
inserted_at | DateTime | When the user was created. |
updated_at | DateTime | When the user was last updated. |
Summary
Functions
Confirms the account by setting confirmed_at
.
A user changeset for signing up or changing the email.
Get a user's name.
A user changeset for updating a user's settings.
A user changeset for signing up.
Functions
Confirms the account by setting confirmed_at
.
A user changeset for signing up or changing the email.
It requires the email to change otherwise an error is added.
Options
:validate_email
- Set to false if you don't want to validate the uniqueness of the email, useful when displaying live validations. Defaults totrue
.
Get a user's name.
Useful for displaying the user's name. It handles the case where the user has not set a display name and falls back to the username.
A user changeset for updating a user's settings.
A user changeset for signing up.