SDK
SDK Java v3.x
2

# UpdateSelf

Updates the current user object in Kuzzle.

# Arguments

Copied to clipboard!
CompletableFuture<ConcurrentHashMap<String, Object>> updateSelf(
  final ConcurrentHashMap<String, Object> content)
  throws NotConnectedException, InternalException
Argument Type Description
content
ConcurrentHashMap<String, Object>
Hashmap representing the user content

# Return

Returns a ConcurrentHashMap with the following properties:

Property Type Description
_id
String
User's kuid
_source
ConcurrentHashMap<String, Object>
Additional (and optional) user properties

# Usage

Copied to clipboard!
ConcurrentHashMap<String, Object> credentials = new ConcurrentHashMap<>();
credentials.put("username", "foo");
credentials.put("password", "bar");
kuzzle.getAuthController().login("local", credentials).get();
ConcurrentHashMap<String, Object> custom = new ConcurrentHashMap<>();
custom.put("age", 42);
ConcurrentHashMap<String, Object> result = 
  kuzzle.getAuthController().updateSelf(custom).get();