FAQ:

How do I store data in a User Profile?

User Profiles are documents that can be used to store and retrieve user information you might otherwise put in a database. BowTie provides a browser profile and purchases profile, but you can create other named profiles as well. You can define and set policies around profile data in order to create specific behavior within your application.

Profiles can be accessed with our HTTP API or our javascript API.

Example - using the javascript API to store information in the browser profile

<script type="text/javascript">
// Store the user's selected timezone
$("#profile-timezone").change(function(){
  bowtie.user.profile({
    timezone: $(this).val();
  });
});
</script>

Example - using the javascript API to retrieve information from the browser profile

<script type="text/javascript">
// Retrieve the user's selected timezone
bowtie.user.profile(function(profile){
  console.log(profile.timezone);
});
</script>

Read are guide about User Profiles, or reference our Profile Documentation for more info.

 

to get started with RazorSite, register for a free trial.



Looking for something else? Check out our User Guides, Examples, and Technical Docs.