Accessing the Currently Enrolled User from JavaScript
You may often want to associate things with the current enrolled user in your app. For this purpose, JourneyApps provides a global user
variable that you can access from any view's JavaScript.
For example, let's say we want to associate objects that a user creates in the mobile app with that particular user. If we have a form
object that belongs to the user
as shown below in our Data Model:
init()
function in one of our views) with the current user as follows, making use of the global user
object: