else
redirect_to :controller => 'site', :action => 'index'
end
- elsif User.authenticate(:username => email_or_display_name, :password => pass, :inactive => true)
+ elsif User.authenticate(:username => email_or_display_name, :password => pass, :pending => true)
flash.now[:error] = t 'user.login.account not active'
+ elsif User.authenticate(:username => email_or_display_name, :password => pass, :suspended => true)
+ flash.now[:error] = t 'user.login.account suspended'
else
flash.now[:error] = t 'user.login.auth failure'
end
user = token.user if token
end
- if user
- user = nil unless user.visible? and (user.active? or options[:inactive])
+ if user and
+ ( user.status == "deleted" or
+ ( user.status == "pending" and not options[:pending] ) or
+ ( user.status == "suspended" and not options[:suspended] ) )
+ user = nil
end
token.update_attribute(:expiry, 1.week.from_now) if token and user
lost password link: "Lost your password?"
login_button: "Login"
account not active: "Sorry, your account is not active yet.<br />Please click on the link in the account confirmation email to activate your account."
+ account suspended: Sorry, your account has been suspended due to suspicious activity.<br />Please contact the <a href="mailto:webmaster@openstreetmap.org">webmaster</a> if you wish to discuss this.
auth failure: "Sorry, could not log in with those details."
logout:
title: "Logout"