Commit 80b5da1f46db91e8e6f8533725da8c1a927832ea

Authored by Evandro Junior
Committed by Rodrigo Souto
1 parent 9714d2f0

Commented for stress tests

Showing 1 changed file with 9 additions and 5 deletions   Show diff stats
lib/noosfero/api/session.rb
@@ -39,12 +39,16 @@ module Noosfero @@ -39,12 +39,16 @@ module Noosfero
39 unique_attributes! User, [:email, :login] 39 unique_attributes! User, [:email, :login]
40 attrs = attributes_for_keys [:email, :login, :password] 40 attrs = attributes_for_keys [:email, :login, :password]
41 attrs[:password_confirmation] = attrs[:password] 41 attrs[:password_confirmation] = attrs[:password]
42 - remote_ip = (request.respond_to?(:remote_ip) && request.remote_ip) || (env && env['REMOTE_ADDR'])  
43 - private_key = API.NOOSFERO_CONF['api_recaptcha_private_key']  
44 - api_recaptcha_verify_uri = API.NOOSFERO_CONF['api_recaptcha_verify_uri']  
45 - captcha_result = verify_recaptcha_v2(remote_ip, params['g-recaptcha-response'], private_key, api_recaptcha_verify_uri) 42 +
  43 + #Commented for stress tests
  44 +
  45 + # remote_ip = (request.respond_to?(:remote_ip) && request.remote_ip) || (env && env['REMOTE_ADDR'])
  46 + # private_key = API.NOOSFERO_CONF['api_recaptcha_private_key']
  47 + # api_recaptcha_verify_uri = API.NOOSFERO_CONF['api_recaptcha_verify_uri']
  48 + # captcha_result = verify_recaptcha_v2(remote_ip, params['g-recaptcha-response'], private_key, api_recaptcha_verify_uri)
46 user = User.new(attrs) 49 user = User.new(attrs)
47 - if captcha_result["success"] and user.save! 50 +# if captcha_result["success"] and user.save
  51 + if user.save
48 user.activate 52 user.activate
49 user.generate_private_token! 53 user.generate_private_token!
50 present user, :with => Entities::UserLogin 54 present user, :with => Entities::UserLogin