Remind the username in the reset password e-mail

closes #8037
This commit is contained in:
flaburgan 2019-06-29 13:24:34 +02:00 committed by Benjamin Neff
parent dc99f0f77a
commit 5b3f75f011
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
6 changed files with 13 additions and 8 deletions

View file

@ -17,6 +17,7 @@
* Add support for footnotes in markdown [#8277](https://github.com/diaspora/diaspora/pull/8277) * Add support for footnotes in markdown [#8277](https://github.com/diaspora/diaspora/pull/8277)
* Send `AccountMigration` if receiving message to a migrated account [#8288](https://github.com/diaspora/diaspora/pull/8288) * Send `AccountMigration` if receiving message to a migrated account [#8288](https://github.com/diaspora/diaspora/pull/8288)
* Add podmin mail address to the footer [#8242](https://github.com/diaspora/diaspora/pull/8242) * Add podmin mail address to the footer [#8242](https://github.com/diaspora/diaspora/pull/8242)
* Add username to password-reset mail [#8037](https://github.com/diaspora/diaspora/pull/8037)
# 0.7.15.0 # 0.7.15.0

View file

@ -1,7 +1,7 @@
<%= t('devise.mailer.welcome', :email => @resource.email) %> <%= t('devise.mailer.welcome', username: @resource.username) %>
<%= t('.you_can_confirm') %> <%= t('.you_can_confirm') %>
[<%= t('.confirm') %>][1] [<%= t('.confirm') %>][1]
[1]: <%= confirmation_url(@resource, :confirmation_token => @token) %> [1]: <%= confirmation_url(@resource, confirmation_token: @token) %>

View file

@ -1,10 +1,12 @@
<%= t('devise.mailer.hello', :email => @resource.email) %> <%= t('devise.mailer.hello', username: @resource.username) %>
<%= t('.someone_requested') %> <%= t('.someone_requested') %>
[<%= t('.change') %>][1] [<%= t('.change') %>][1]
[1]: <%= edit_password_url(@resource, :reset_password_token => @token) %> [1]: <%= edit_password_url(@resource, reset_password_token: @token) %>
<%= t('.then_connect', username: @resource.username) %>
<%= t('.wont_change') %> <%= t('.wont_change') %>

View file

@ -1,4 +1,4 @@
<%= t('devise.mailer.hello', :email => @resource.email) %> <%= t('devise.mailer.hello', username: @resource.username) %>
<%= t('.account_locked') %> <%= t('.account_locked') %>
@ -6,4 +6,4 @@
[<%= t('.unlock') %>][1] [<%= t('.unlock') %>][1]
[1]: <%= unlock_url(@resource, :unlock_token => @token) %> [1]: <%= unlock_url(@resource, unlock_token: @token) %>

View file

@ -30,6 +30,7 @@ en:
someone_requested: Someone has requested a link to change your password. If someone_requested: Someone has requested a link to change your password. If
it was you, you can do this through the link below. it was you, you can do this through the link below.
change: Change my password change: Change my password
then_connect: After setting a new password, you will be able to sign into diaspora* again using your username "%{username}" and your new password
wont_change: Your password won't change until you access the link above and wont_change: Your password won't change until you access the link above and
create a new one. create a new one.
ignore: If you didn't request this, please ignore this email. ignore: If you didn't request this, please ignore this email.
@ -41,8 +42,8 @@ en:
unlock: Unlock my account unlock: Unlock my account
password_change: password_change:
subject: Password Changed subject: Password Changed
welcome: Welcome %{email}! welcome: Welcome %{username}!
hello: Hello %{email}! hello: Hello %{username}!
inviter: inviter:
has_invited_you: "%{name}" has_invited_you: "%{name}"
have_invited_you: "%{names} have invited you to join diaspora*" have_invited_you: "%{names} have invited you to join diaspora*"

View file

@ -13,6 +13,7 @@ describe Workers::ResetPassword do
mail = Devise.mailer.deliveries.last mail = Devise.mailer.deliveries.last
expect(mail.to).to eq([alice.email]) expect(mail.to).to eq([alice.email])
expect(mail.body).to include("change your password") expect(mail.body).to include("change your password")
expect(mail.body).to include(alice.username)
end end
end end
end end