Actually use user_block

This commit is contained in:
Simon Poole 2017-02-18 16:17:46 +01:00
parent 823f6b4d36
commit 58c61c7962

View file

@ -155,7 +155,7 @@ class ApplicationController < ActionController::Base
user_block = @user.blocks.active.take
unless user_block.nil?
set_locale
if @user.blocks.active.take.zero_hour?
if user_block.zero_hour?
report_error t("application.setup_user_auth.blocked_zero_hour"), :forbidden
else
report_error t("application.setup_user_auth.blocked"), :forbidden