Object
Access App’s User Object
Kind: global function
Returns: Object
- User Object
Since: v0.0.1
Example
// undefined
getUser() // -> {}
// defined
// App = {
// user: {
// attributes: {
// model: {cid: "...", attributes: {...}, ...}
// },
// ...
// }
// }
getUser() // -> returns Backbone.Model -> {cid: "...", attributes: {...}, ...}
getUser().get('user_name') // -> returns user_name of the User.
getUser('user_name') // -> returns user_name of the User.
getUser('preferences') // -> returns Preferences Object -> {timezone: "...", tz_offset: "...", ...}
getUser().toJSON() // -> return Object version of the data. -> {id: "...", preferences: "...", ...}