Last active
January 9, 2017 17:50
-
-
Save looneym/211772e8371e1c68e1522e1ec868d1eb to your computer and use it in GitHub Desktop.
Conditionally populate intercomSettings object with user data if user is logged in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (CurrentUser.loggedIn)){ | |
window.intercomSettings = { | |
app_id: APP_ID, | |
name: CurrentUser.Name, | |
email: CurrentUser.Email, | |
user_id: CurrentUser.userID, | |
}; | |
} else { | |
window.intercomSettings = { | |
app_id: APP_ID, | |
}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment