## user : object Access data about employees. **Kind**: global namespace * [user](#user) : object * [.User](#user.User) * [new User(id, name, password, barcode, enabled)](#new_user.User_new) * [.getUser()](#user.getUser) ⇒ User * [.getUserID()](#user.getUserID) ⇒ number * [.getUserByID()](#user.getUserByID) ⇒ Promise.<User> * [.listUsers([managerMode])](#user.listUsers) ⇒ Promise.<Array.<User>> ### user.User **Kind**: static class of [user](#user) **Properties** | Name | Type | Description | | --- | --- | --- | | id | number | | | name | string | | | pass | string | | | barcode | string | | | enabled | boolean | | | hasPassword() | function | Returns true if the user has a password set, else false. | | checkPassword(string) | function | Returns true if the provided password matches the user's password, or if there is no password set. | | icon(number) | function | Returns a SVG data URI with a procedurally-generated icon for the user. Size defaults to 50px if not specified. | #### new User(id, name, password, barcode, enabled) A User object. | Param | Type | | --- | --- | | id | number | | name | string | | password | string | | barcode | string | | enabled | boolean | ### user.getUser() ⇒ User Get the user currently logged in. **Kind**: static method of [user](#user) ### user.getUserID() ⇒ number Get the current user's ID number. **Kind**: static method of [user](#user) ### user.getUserByID() ⇒ Promise.<User> Look up the User for an ID number. **Kind**: static method of [user](#user) ### user.listUsers([managerMode]) ⇒ Promise.<Array.<User>> Get a list of all users in the system. **Kind**: static method of [user](#user) | Param | Type | Default | Description | | --- | --- | --- | --- | | [managerMode] | boolean | false | If false, list only active/enabled users, and if no users, return a default user account (user ID -1). If true, return all users in the database, and don't return a default account if the list is empty (return an empty list instead). |