   if postSignupAction
     return unless @currentUser
     { action, objectId, kind } = JSON.parse(postSignupAction)
+    
     if action is 'save'
       @currentUser.initializeDefaultArtworkCollection()
       @currentUser.defaultArtworkCollection().saveArtwork objectId

HeaderView = require './client/header_view.coffee'
doc = window.document
sharify = require('sharify')
CurrentUser = require '../../../models/current_user.coffee'

module.exports = ->
  # Add the Gravity XAPP or access token to all ajax requests


ensureFreshUser = (data) ->
  return unless sd.CURRENT_USER
  attrs = [
    'id',
    'type',
    'name',
    'email',
    'phone',
    'lab_features',
    'default_profile_id',
    'has_partner_access',
    'collector_level'
  ]
  for attr in attrs
    if not _.isEqual data[attr], sd.CURRENT_USER[attr]
      $.ajax('/user/refresh').then -> window.location.reload()

