Login por matricula
This commit is contained in:
@ -44,6 +44,12 @@ defmodule Derivantes.Accounts do
|
||||
if User.valid_password?(user, password), do: user
|
||||
end
|
||||
|
||||
def get_user_by_matricula_and_password(matricula, password)
|
||||
when is_binary(matricula) and is_binary(password) do
|
||||
user = Repo.get_by(User, matricula: matricula)
|
||||
if User.valid_password?(user, password), do: user
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets a single user.
|
||||
|
||||
|
@ -22,19 +22,13 @@ defmodule Derivantes.Accounts.UserNotifier do
|
||||
Deliver instructions to confirm account.
|
||||
"""
|
||||
def deliver_confirmation_instructions(user, url) do
|
||||
deliver(user.email, "Confirmation instructions", """
|
||||
deliver(user.email, "Confirme su correo electrónico", """
|
||||
|
||||
==============================
|
||||
|
||||
Hi #{user.email},
|
||||
|
||||
You can confirm your account by visiting the URL below:
|
||||
Hola #{user.email},
|
||||
Active su cuenta haciendo click en el siguiente enlace:
|
||||
|
||||
#{url}
|
||||
|
||||
If you didn't create an account with us, please ignore this.
|
||||
|
||||
==============================
|
||||
""")
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user