Coherence v0.5.1 Coherence.InvitationController

Handle invitation actions.

Handle the following actions:

  • new - render the send invitation form.
  • create - generate and send the invitation token.
  • edit - render the form after user clicks the invitation email link.
  • create_user - create a new user database record
  • resend - resend an invitation token email

Link to this section Summary

Functions

Generate and send an invitation token

Create a new user action

Render the create user template

Render the new invitation form

Resent an invitation

Link to this section Types

Link to this type conn()
conn() :: Plug.Conn.t()
Link to this type params()
params() :: Map.t()
Link to this type schema()
schema() :: Ecto.Schema.t()

Link to this section Functions

Link to this function create(conn, params)
create(conn(), params()) :: conn()

Generate and send an invitation token.

Creates a new invitation token, save it to the database and send the invitation email.

Link to this function create_user(conn, params)
create_user(conn(), params()) :: conn()

Create a new user action.

Create a new user based from an invite token.

Link to this function edit(conn, params)
edit(conn(), params()) :: conn()

Render the create user template.

Sets the name and email address in the form based on what was entered when the invitation was sent.

Link to this function new(conn, params)
new(conn(), params()) :: conn()

Render the new invitation form.

Link to this function resend(conn, params)
resend(conn(), params()) :: conn()

Resent an invitation

Resent the invitation based on the invitation’s id.