]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Tell users their account has been suspended when they try and login
[rails.git] / app / controllers / user_controller.rb
index f24e1ee72c5c96f30d3fd1fad8d9952384b76cd6..af0ccba055eef8824a59b0441f5f3e5603ca4a33 100644 (file)
@@ -173,8 +173,10 @@ class UserController < ApplicationController
         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