SDK
SDK Javascript v5.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

setContent #

Replaces the content of User.

Updating a user will have no impact until the [`create`](/sdk/js/5/core-classes/user/create) or [`replace`](/sdk/js/5/core-classes/user/replace) method is called

setContent(data) #

ArgumentsTypeDescription
dataJSON ObjectUser content

Return Value #

Returns the User object.

Usage #

var user = kuzzle.security.fetchUser('myuser');
var userContent = {
  profileIds: ['profileId']
};
user = user.setContent(userContent);