Commit ad1a6b16b2b277a922b55f427b181e412a988d3a

Authored by Rodrigo Souto
1 parent 7b118e80

account-controller: return if any plugin answers the allow_user_registration hotspot

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
app/controllers/public/account_controller.rb
... ... @@ -70,10 +70,12 @@ class AccountController < ApplicationController
70 70 if @plugins.dispatch(:allow_user_registration).include?(false)
71 71 redirect_back_or_default(:controller => 'home')
72 72 session[:notice] = _("This environment doesn't allow user registration.")
  73 + return
73 74 end
74 75  
75 76 store_location(request.referer) unless params[:return_to] or session[:return_to]
76 77  
  78 + # Tranforming to boolean
77 79 @block_bot = !!session[:may_be_a_bot]
78 80 @invitation_code = params[:invitation_code]
79 81 begin
... ...