SDK
SDK Android v3.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.

addProfile #

Replaces the security profile associated with the user.

Updating a user will have no impact until the create or replace method is called


addProfile(profileId) #

ArgumentsTypeDescription
profileIdstringProfile ID

addProfile(profile) #

ArgumentsTypeDescription
profileProfileAn instantiated Profile object

Return Value #

Returns the User object.

Usage #

// Updating the profile with a Profile object
kuzzle
  .security
  .fetchProfile("myprofile", opts, new ResponseListener<Profile>() {
    @Override
    public void onSuccess(Profile profile) {
      // Can add the profile directly with a Profile object
      user.addProfile(profile);
    }
  });
// Updating the profile with a profile ID
user.addProfile("myprofile");