elsif (user = User.authenticate(:username => username, :password => password, :pending => true))
unconfirmed_login(user)
elsif User.authenticate(:username => username, :password => password, :suspended => true)
- failed_login t("sessions.new.account is suspended", :webmaster => "mailto:#{Settings.support_email}").html_safe, username
+ failed_login({ :partial => "sessions/suspended_flash" }, username)
else
failed_login t("sessions.new.auth failure"), username
end
when "active", "confirmed"
successful_login(user, request.env["omniauth.params"]["referer"])
when "suspended"
- failed_login t("sessions.new.account is suspended", :webmaster => "mailto:#{Settings.support_email}").html_safe
+ failed_login({ :partial => "sessions/suspended_flash" })
else
failed_login t("sessions.new.auth failure")
end
--- /dev/null
+<p><%= t ".suspended" %></p>
+<p><%= t ".contact_support_html", :support_link => mail_to(Settings.support_email, t(".support")) %></p>
create account minute: Create an account. It only takes a minute.
no account: Don't have an account?
account not active: "Sorry, your account is not active yet.<br />Please use the link in the account confirmation email to activate your account, or <a href=\"%{reconfirm}\">request a new confirmation email</a>."
- account is suspended: Sorry, your account has been suspended due to suspicious activity.<br />Please contact <a href="%{webmaster}">support</a> if you wish to discuss this.
auth failure: "Sorry, could not log in with those details."
openid_logo_alt: "Log in with an OpenID"
auth_providers:
title: "Logout"
heading: "Logout from OpenStreetMap"
logout_button: "Logout"
+ suspended_flash:
+ suspended: Sorry, your account has been suspended due to suspicious activity.
+ contact_support_html: Please contact %{support_link} if you wish to discuss this.
+ support: support
shared:
markdown_help:
title_html: Parsed with <a href="https://kramdown.gettalong.org/quickref.html">kramdown</a>