mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Delay MailChimp subscribing after account creation by 30min
This commit is contained in:
parent
ffcd89d327
commit
abc42298c6
1 changed files with 3 additions and 0 deletions
|
@ -162,6 +162,9 @@ UserSchema.statics.updateServiceSettings = (doc, callback) ->
|
|||
return callback?() unless isProduction or GLOBAL.testing
|
||||
return callback?() if doc.updatedMailChimp
|
||||
return callback?() unless doc.get('email')
|
||||
return callback?() unless doc.get('dateCreated')
|
||||
accountAgeMinutes = (new Date().getTime() - doc.get('dateCreated').getTime?() ? 0) / 1000 / 60
|
||||
return callback?() unless accountAgeMinutes > 30 or GLOBAL.testing
|
||||
existingProps = doc.get('mailChimp')
|
||||
emailChanged = (not existingProps) or existingProps?.email isnt doc.get('email')
|
||||
|
||||
|
|
Loading…
Reference in a new issue