redirect_to t('user.terms.declined')
elsif @user
if !@user.terms_agreed?
@user.consider_pd = params[:user][:consider_pd]
@user.terms_agreed = Time.now.getutc
redirect_to t('user.terms.declined')
elsif @user
if !@user.terms_agreed?
@user.consider_pd = params[:user][:consider_pd]
@user.terms_agreed = Time.now.getutc
@user.creation_ip = request.remote_ip
@user.languages = request.user_preferred_languages
@user.terms_agreed = Time.now.getutc
@user.creation_ip = request.remote_ip
@user.languages = request.user_preferred_languages
@user.terms_agreed = Time.now.getutc
if @user.save
flash[:notice] = t 'user.new.flash create success message', :email => @user.email
Notifier.deliver_signup_confirm(@user, @user.tokens.create(:referer => params[:referer]))
if @user.save
flash[:notice] = t 'user.new.flash create success message', :email => @user.email
Notifier.deliver_signup_confirm(@user, @user.tokens.create(:referer => params[:referer]))
+ # if the user hasn't seen the contributor terms then redirect them
+ # to that page.
+ if REQUIRE_TERMS_SEEN and not user.terms_seen
+ redirect_to :controller => 'user', :action => 'terms', :referer => params[:referer]
# The user is logged in, if the referer param exists, redirect
# them to that unless they've also got a block on them, in
# which case redirect them to the block so they can clear it.
# The user is logged in, if the referer param exists, redirect
# them to that unless they've also got a block on them, in
# which case redirect them to the block so they can clear it.
redirect_to user.blocked_on_view, :referer => params[:referer]
elsif params[:referer]
redirect_to params[:referer]
redirect_to user.blocked_on_view, :referer => params[:referer]
elsif params[:referer]
redirect_to params[:referer]