getProfiles

// Using callbacks (NodeJS or Web Browser)
user
  .getProfiles(function(error, profiles) {
    // result is an array of Profile objects
  });

// Using promises (NodeJS)
user
  .getProfilesPromise()
  .then(profiles => {
    // profiles is an array of Profile objects
  });
user.getProfiles(new ResponseListener<Profile[]>() {
  @Override
  public void onSuccess(Profile[] profiles) {

  }

  @Override
  public void onError(JSONObject error) {

  }
});
<?php

use Kuzzle\Security\User;

// ...

/*
 * @var $user User
 */

try {
  for ($user->getProfiles() as $profile) {
    // $profile is a Profile object
  }
}
catch (ErrorException $e) {

}

Gets the associated Profile instances from the Kuzzle API, using the profile identifiers attached to this user (see getProfileIds)


getProfiles([options], callback)

ArgumentsTypeDescription
optionsJSON ObjectOptional parameters
callbackfunctionCallback handling the response

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to an array of Profile objects