something awful login data
all the stuff to add 2 fields to the user object and to access the logged0in user in a liveview session
This commit is contained in:
@ -8,9 +8,20 @@ defmodule SomethingErlang.Accounts.User do
|
||||
field :hashed_password, :string, redact: true
|
||||
field :confirmed_at, :naive_datetime
|
||||
|
||||
field :bbuserid, :string
|
||||
field :bbpassword, :string
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
@doc """
|
||||
A user changeset for SA data.
|
||||
"""
|
||||
def sadata_changeset(user, attrs, _opts \\ []) do
|
||||
user
|
||||
|> cast(attrs, [:bbuserid, :bbpassword])
|
||||
end
|
||||
|
||||
@doc """
|
||||
A user changeset for registration.
|
||||
|
||||
|
Reference in New Issue
Block a user