View Source Bonfire.Data.Identity.Email (bonfire v0.3.5-classic-beta.6)

Link to this section 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

Link to this section 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()
}

Link to this section 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

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