check if user exists on recurly callback

This commit is contained in:
Henry Oswald 2015-10-21 11:27:13 +01:00
parent d9734953a6
commit 885915916a

View file

@ -70,6 +70,8 @@ module.exports =
return callback(error) if error?
User.findById recurlySubscription.account.account_code, (error, user) ->
return callback(error) if error?
if !user?
return callback("no user found")
SubscriptionUpdater.syncSubscription recurlySubscription, user?._id, callback