projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[#184] small refactoring reset password
[akkoma]
/
lib
/
pleroma
/
emails
/
user_email.ex
diff --git
a/lib/pleroma/emails/user_email.ex
b/lib/pleroma/emails/user_email.ex
index ca0772f57e99ed623a9116272cc3cc2e7f0ecb9f..9346207658f2bc48491b06dfafe81e439004765a 100644
(file)
--- a/
lib/pleroma/emails/user_email.ex
+++ b/
lib/pleroma/emails/user_email.ex
@@
-2,7
+2,7
@@
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
-defmodule Pleroma.UserEmail do
+defmodule Pleroma.
Emails.
UserEmail do
@moduledoc "User emails"
import Swoosh.Email
@moduledoc "User emails"
import Swoosh.Email
@@
-23,13
+23,8
@@
defmodule Pleroma.UserEmail do
defp recipient(email, name), do: {name, email}
defp recipient(%Pleroma.User{} = user), do: recipient(user.email, user.name)
defp recipient(email, name), do: {name, email}
defp recipient(%Pleroma.User{} = user), do: recipient(user.email, user.name)
- def password_reset_email(user, password_reset_token) when is_binary(password_reset_token) do
- password_reset_url =
- Router.Helpers.util_url(
- Endpoint,
- :show_password_reset,
- password_reset_token
- )
+ def password_reset_email(user, token) when is_binary(token) do
+ password_reset_url = Router.Helpers.reset_password_url(Endpoint, :reset, token)
html_body = """
<h3>Reset your password at #{instance_name()}</h3>
html_body = """
<h3>Reset your password at #{instance_name()}</h3>