Don't check the ACL unless we're creating a new user

This commit is contained in:
Tom Hughes 2012-02-08 22:35:13 +00:00
parent b3df1f12ee
commit 8eef66cee2

View file

@ -38,7 +38,7 @@ class UserController < ApplicationController
else
render :action => 'terms'
end
elsif Acl.match(request.remote_ip, params[:user][:email].split("@").last).where(:k => "no_account_creation").exists?
elsif params[:user] and Acl.match(request.remote_ip, params[:user][:email].split("@").last).where(:k => "no_account_creation").exists?
render :action => 'blocked'
else
session[:referer] = params[:referer]