View Source Bonfire.Data.Identity.Email (Bonfire v0.9.10-classic-beta.156)

Summary

Functions

Options: email_regex: Regexp.t (default very minimal validation) must_confirm?: bool (default true)

Changeset function. Marks the user's email as confirmed and removes their confirmation token.

Checks whether the user should be able to request a confirm email

Changeset function. Unconditionally sets the user as unconfirmed, generates a confirmation token and puts an expiry on it determined by the :confirm_duration config key (default one day).

Checks whether the user should request a new confirmation token or refresh it

Types

@type t() :: %Bonfire.Data.Identity.Email{
  __meta__: term(),
  account: term(),
  confirm_token: term(),
  confirm_until: term(),
  confirmed_at: term(),
  email_address: term(),
  id: term(),
  pointer: term()
}

Functions

Link to this function

changeset(email \\ %Email{}, params, opts \\ [])

View Source

Options: email_regex: Regexp.t (default very minimal validation) must_confirm?: bool (default true)

Changeset function. Marks the user's email as confirmed and removes their confirmation token.

Link to this function

get(struct, key, default \\ nil)

View Source
Link to this function

may_confirm?(email, opts \\ [])

View Source
Link to this function

may_request_confirm_email?(email, opts \\ [])

View Source

Checks whether the user should be able to request a confirm email

Changeset function. Unconditionally sets the user as unconfirmed, generates a confirmation token and puts an expiry on it determined by the :confirm_duration config key (default one day).

Link to this function

should_request_or_refresh?(email, opts \\ [])

View Source

Checks whether the user should request a new confirmation token or refresh it