Class

User

User(dataopt)

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

Constructor

# new User(dataopt)

Create a user from a JSON object

Parameters:
Name Type Attributes Default Description
data object <optional>
{}

The user data

Properties:
Name Type Description
licences Array.<Licence>

Licences

avatar string

Avatar

name string

Name

contact Contact

Contact

userGroups Array.<string>

User groups

userRoles Array.<string>

User roles

scopes Array.<Scope>

Scopes

licences Array.<Licence>

Licences

View Source infohub/User.js, line 78

Classes

User

Methods

# getAvatar() → {string}

Get the avatar of a user

View Source infohub/User.js, line 142

  • The avatar base64 string
string

# getData() → {object}

Get the user data

View Source infohub/User.js, line 100

  • The user data
object

# setAvatar(avatar) → {void}

Set the avatar of a user

Parameters:
Name Type Description
avatar string

The avatar base64 string

View Source infohub/User.js, line 135

void

# setData(data) → {void}

Set the user data

Parameters:
Name Type Description
data object

The user data

View Source infohub/User.js, line 92

void

# setFromJSON(user) → {void}

Set the user from a JSON object

Parameters:
Name Type Description
user object

The JSON object

View Source infohub/User.js, line 109

void

# toJSON() → {object}

Convert the user to a JSON object

View Source infohub/User.js, line 117

  • The JSON object
object

# static createFromJSON(user) → {User}

Create a user from a JSON object

Parameters:
Name Type Description
user object

The JSON object

View Source infohub/User.js, line 126

  • The user
User