From: Tom Hughes Date: Mon, 23 Jan 2012 14:31:06 +0000 (+0000) Subject: Fix exception when a suspended user tries to login X-Git-Tag: live~5858 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/2c666b42d7bbe20f95272a7ebecd7d9167762c44 Fix exception when a suspended user tries to login --- diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 89f35a899..8c63f8b75 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -512,8 +512,7 @@ private elsif user = User.authenticate(:username => username, :password => password, :pending => true) failed_login t('user.login.account not active', :reconfirm => url_for(:action => 'confirm_resend', :display_name => user.display_name)) elsif User.authenticate(:username => username, :password => password, :suspended => true) - webmaster = link_to t('user.login.webmaster'), "mailto:webmaster@openstreetmap.org" - failed_login t('user.login.account suspended', :webmaster => webmaster) + failed_login t('user.login.account is suspended', :webmaster => "mailto:webmaster@openstreetmap.org") else failed_login t('user.login.auth failure') end @@ -546,8 +545,7 @@ private when "active", "confirmed" then successful_login(user) when "suspended" then - webmaster = link_to t('user.login.webmaster'), "mailto:webmaster@openstreetmap.org" - failed_login t('user.login.account suspended', :webmaster => webmaster) + failed_login t('user.login.account is suspended', :webmaster => "mailto:webmaster@openstreetmap.org") else failed_login t('user.login.auth failure') end diff --git a/config/locales/en.yml b/config/locales/en.yml index bd467cb7b..1ab8ef90d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1552,8 +1552,7 @@ en: to make changes: To make changes to the OpenStreetMap data, you must have an account. create account minute: Create an account. It only takes a minute. account not active: "Sorry, your account is not active yet.
Please use the link in the account confirmation email to activate your account, or request a new confirmation email." - account suspended: Sorry, your account has been suspended due to suspicious activity.
Please contact the %{webmaster} if you wish to discuss this. - webmaster: webmaster + account is suspended: Sorry, your account has been suspended due to suspicious activity.
Please contact the webmaster if you wish to discuss this. auth failure: "Sorry, could not log in with those details." notice: "Find out more about OpenStreetMap's upcoming license change (translations) (discussion)" notice_terms: "OpenStreetMap is moving to a new licence on 1st April 2012. It's just as open as our current one, but the legal bits are much better suited to our map database. We'd love to keep your contributions in OpenStreetMap, but we can only do so if you agree to let us distribute them under the new licence. Otherwise, we'll have to remove them from the database.

Please log in, then take a few seconds to review and accept the new terms. Thank you!"