user #
Instantiates a new User object.
user(id, content) #
Arguments | Type | Description |
---|---|---|
id | string | Unique user identifier |
content | JSON Object | User content |
Return value #
Returns the new User object.
Usage #
JSONObject userContent = new JSONObject()
// A "profileIds" field is required to bind a user to an existing profile
.put("profileIds", new JSONArray().put('someProfile'))
// The "local" authentication strategy requires a password
.put("password", "a password")
// You can also set custom fields to your user
.put("firstname", "John")
.put("lastname", "Doe");
User user = kuzzle.security.user("<kuid>", userContent);
Edit this page on Github(opens new window)