SDK PHP v3.x

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) #

Arguments Type Description
profileId string Profile ID

addProfile(profile) #

Arguments Type Description
profile Profile An instantiated Profile object

Return Value #

Returns the User object.

Usage #

Copied to clipboard!
use Kuzzle\Security\Profile;
use Kuzzle\Security\User;
// ...
$profile = $kuzzle->security->fetchProfile('myProfile');
  * @var $user User
// Updating the profile with a Profile object
// Updating the profile with a profile ID