From d5b5b460930f2441f8555e8fcd398ac60d643ce5 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 20 Apr 2013 12:14:27 +0200 Subject: [PATCH] Added reset of current_user_id. --- app/models/channel/email_parser.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/channel/email_parser.rb b/app/models/channel/email_parser.rb index 3f0e73e81..a7486cd98 100644 --- a/app/models/channel/email_parser.rb +++ b/app/models/channel/email_parser.rb @@ -294,6 +294,10 @@ class Channel::EmailParser # use transaction ActiveRecord::Base.transaction do + # reset current_user + UserInfo.current_user_id = 1 + + if mail[ 'x-zammad-customer-login'.to_sym ] user = User.where( :login => mail[ 'x-zammad-customer-login'.to_sym ] ).first end