        user_id: user.id
        created_at: user.createdAt
        is_coordinator: user.isCoordinator
-       angular_ui: true
        locale: user.locale
-       company: mapGroup(firstGroup)
+       company: lastGroup
        has_profile_photo: user.hasProfilePhoto()
        belongs_to_paying_group: user.belongsToPayingGroup()
 

    updateWithGroup: (group) ->
      return unless @available()
      user = Session.user()
      return if currentGroup == group
      return if group.isSubgroup()
      return if !user.isMemberOf(group)
      currentGroup = group
      $window.Intercom 'update',
        email: user.email
        user_id: user.id
        company: mapGroup(group)

    contactUs: ->
      if @available()

    boot: ->
      return unless $window? and $window.Intercom?
      user = Session.user()
      lastGroup = mapGroup(user.parentGroups()[0])

      $window.Intercom 'boot',
       admin_link: LmoUrlService.user(user, {}, { noStub: true, absolute: true, namespace: 'admin/users', key: 'id' })
