Class

User

User()

User aggregate (avatar, name, contact, groups, roles).

Constructor

# new User()

Properties:
Name Type Description
avatar string

Base64 avatar image

name string

Display name

info Contact

Contact information

userGroups object

Group ids

userRoles Array.<string>

Role ids

View Source infohub/User.js, line 103

Classes

User

Methods

# getAvatar() → {string}

Get the avatar of a user locally.

View Source infohub/User.js, line 158

  • The avatar base64 string
string

# setAvatar(avatar) → {void}

Set the avatar of a user locally.

Parameters:
Name Type Description
avatar string

The avatar base64 string

View Source infohub/User.js, line 150

void

# setFromJSON(useropt) → {void}

Set the user info from a JSON object

Parameters:
Name Type Attributes Default Description
user User <optional>
{}

View Source infohub/User.js, line 117

void

# toJSON() → {object}

Convert the user info to a JSON object

View Source infohub/User.js, line 129

object

# static createFromJSON(useropt) → {User}

Create a User object from a JSON object

Parameters:
Name Type Attributes Default Description
user User <optional>
{}

View Source infohub/User.js, line 139

User