Adding or modifying a user (bizzstream.addUser)

You can use bizzstream.addUser to add or modify a user.

bizzStream.addUser({options});
Parameter Type Required Description
globalEmailAddress String Yes E-mail address of the concerning user. The field must be valid otherwise an error is thrown. If there is already a user with the same global e-mail address, the existing user is added to the environment. If there is no user with the same global e-mail address, a new user is created and added to the environment.
name String Yes, but only when adding a new user. The name of the concerning user in relation to the environment.
administrator Boolean Yes, but only when adding a new user. Indicates whether the user is an administrator in the environment.
active Boolean Yes, but only when adding a new user. Indicates whether the user is active in the environment.
locale String Yes, but only when adding a new user. Locale of the user that will be used for time/date and numeric values. The values en (English), nl (Dutch), de (German), fr (French), sp (Spanish) and pl (Polish) are allowed.
language String Yes, but only when adding a new user. Language of the user. The values en (English), nl (Dutch), de (German), fr (French), sp (Spanish) and pl (Polish) are allowed.
menuName String No Adds the specified menu (by name) to the specified user while overriding existing menus.
menuId String No Adds the specified menu (by id) to the specified user while overriding existing menus.
menuNames Array No Adds the specified menu's (by name) to the specified user while overriding existing menus.
menuIds Array No Adds the specified menu's (by id) to the specified user while overriding existing menus.
addMenuNames Array No Adds the specified menu's (by name) to the specified user without overriding existing menus.
addMenuIds Array No Adds the specified menu's (by id) to the specified user without overriding existing menus.
memberGroupNames Array No The group name(s) will be used to attach the user to the group(s).
memberGroupIds Array No The group id's will be used to attach the user to the group(s).

Example

bizzStream.addUser({
     'globalEmailAddress': 'peter@maxedy.com',
     'name': 'Peter',
     'administrator': true,
     'active': true,
     'locale': 'en',
     'language': 'en',
     'menuName': 'maxedyPizza',
     'menuId' : '2345',
     'memberGroupNames': ['chiefs', 'cooks'],
     'memberGroupIds': ['12345', '6789']
})

Will result in:

{  "_id": "XBFYvbeSAMHGJReGg",
  "createdAt": "2017-02-25T09:54:34.203Z",
  "username": "peter@maxedy.com",
  "emails": [
    {
      "address": "peter@maxedy.com",
      "verified": false
    }
  ],
  "profile": {
    "environments": [
      {
        "environmentId": "maxedy_pizza",
        "name": "Peter",
        "language": "en",
        "locale": "en",
        "email": "peter@maxedy.com",
        "active": true,
        "administrator": true
      }
    ],
    "sendEmailUponNewReleases": false
  },
  "_lastModifiedByUserId": "system",
  "_lastModifiedOn": "2017-02-25T09:55:07.670Z"
}

results matching ""

    No results matching ""