Fixing unsafe use of Thread.current variable :current_user
Merge pull request #5344 from amacarthur/thread-variable-fix

Fixing unsafe use of Thread.current variable :current_user