FEATURE: forgot_password_strict setting also prevents reporting that an email address is taken during signup

This commit is contained in:
Neil Lalonde
2017-10-03 14:08:37 -04:00
parent cc4a102b26
commit e47f5cedd2
5 changed files with 74 additions and 0 deletions

View File

@ -83,6 +83,15 @@ class UserNotifications < ActionMailer::Base
)
end
def account_exists(user, opts = {})
build_email(
user.email,
template: 'user_notifications.account_exists',
locale: user_locale(user),
email: user.email
)
end
def short_date(dt)
if dt.year == Time.now.year
I18n.l(dt, format: :short_no_year)