X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7b9e852c9d53318cfc949fe4ceef2d3b665e2020..03fb042591bf60cd74aa277ee3de98f02d8486d3:/app/controllers/user_controller.rb diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index f2d93d29e..aae059252 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -16,7 +16,7 @@ class UserController < ApplicationController filter_parameter_logging :password, :pass_crypt, :pass_crypt_confirmation - cache_sweeper :user_sweeper, :only => [:account, :set_status, :delete] + cache_sweeper :user_sweeper, :only => [:account, :set_status, :delete], :unless => OSM_STATUS == :database_offline def terms @title = t 'user.new.title' @@ -402,7 +402,8 @@ private elsif User.authenticate(:username => username, :password => password, :pending => true) failed_login t('user.login.account not active') elsif User.authenticate(:username => username, :password => password, :suspended => true) - failed_login t('user.login.account suspended') + webmaster = link_to t('user.login.webmaster'), "mailto:webmaster@openstreetmap.org" + failed_login t('user.login.account suspended', :webmaster => webmaster) else failed_login t('user.login.auth failure') end @@ -430,10 +431,15 @@ private # provider do we know the unique address for the user. if user = User.find_by_openid_url(identity_url) case user.status - when "pending" then failed_login t('user.login.account not active') - when "active", "confirmed" then successful_login(user) - when "suspended" then failed_login t('user.login.account suspended') - else failed_login t('user.login.auth failure') + when "pending" then + failed_login t('user.login.account not active') + 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) + else + failed_login t('user.login.auth failure') end else # We don't have a user registered to this OpenID, so redirect