spree/spree_social — pull request #132 by jackkinsella (2014-03-31 09:49:28+00:00)
Title: Do not try to associate order if no valid user created

In production I received eight sporadic errors in the last few months: "cannot call .user on nil" errors due to line 42 of the omniauth_callbacks_controller.rb. This line attempts to associate the current order with a user. After investigation I discovered that the exception happens only with new users that deny the provider access to email. The solution, I think, is to explicitly return so as to avoid the order association code block during these circumstances.

I'd like a second pair of eyeballs before merging because I'm not 100% familiar with the consequences to greater Spree. I've also deployed into production and will report here if the change leads to any unexpected behaviour.