Permalink
Browse files

Updated

  • Loading branch information...
1 parent 88ed730 commit a552842adaf50f49fa6e027d91da2c6367ceea46 Tom Meier committed Oct 14, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/crm_web_to_lead.rb
View
@@ -15,12 +15,13 @@ def app_before_filter(controller, context = {})
params = controller.params
params.merge!(params[:ffcrm]).delete(:ffcrm) if (controller.request.xhr? || controller.request.headers["CONTENT_TYPE"] == 'text/xml') && params[:ffcrm]
+
if controller.request.post? && !params[:authorization].blank? && !params[:token].blank?
user = User.find_by_password_hash_and_password_salt(params[:authorization], params[:token])
# Implant @current_user so that :require_user filter becomes a noop.
controller.instance_variable_set("@current_user", user)
- controller.logger.info(">>> web-to-lead: creating lead for user " + user.inspect) if controller.logger
+ controller.logger.info(">>> web-to-lead: creating lead for user " + user.inspect + "\nParameters:\n#{params.inspect}") if controller.logger
end
end

0 comments on commit a552842

Please sign in to comment.