setProfiles #
Replaces the security profiles linked to the user.
setProfiles(profileIds) #
Arguments | Type | Description |
---|---|---|
profileIds | array of strings | List of profile IDs |
setProfiles(profiles) #
Arguments | Type | Description |
---|---|---|
profiles | array of Profile objects | An array of instantiated Profile objects |
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) {
ArrayList<Profile> profileIds = new ArrayList<Profile>();
profileIds.add(profile);
user.setProfiles(profileIds);
}
});
// Updating the profile with a profile ID
ArrayList<String> profileIds = new ArrayList<String>();
profileIds.add("myprofile");
user.setProfiles(profileIds);
Edit this page on Github(opens new window)