Documentation

User

A JavaScript module which provides functions to interact with the user currently in session.

Methods

getTimeZone(callback)

Retrieve the current user's timezone. If there is no logged in user, the server timezone is returned.

Parameters:
Name Type Description
callback function

the callback that handles the response

Example
AP.getTimeZone(function(timezone){
  alert(timezone);
});

getUser(callback)

Retrieves the current user object containing the user's id and full name

Parameters:
Name Type Description
callback function

the callback that handles the response

Example
AP.getUser(function(user){
  console.log("user id", user.id);
  console.log("user key", user.key);
  console.log("user name", user.fullName);
});