setCredentials #
Sets the user's credentials.
Updating user credentials will have no impact until the create method is called.
The credentials to send depend on the authentication plugin and the strategy you want to create credentials for.
setCredentials(credentials) #
Arguments | Type | Description |
---|---|---|
credentials | object | An object containing an attribute for each strategy you want to link the user to. |
Return Value #
Returns the User
object.
Usage #
<?php
use Kuzzle\Security\User;
/*
* @var $user User
*/
// Updating the profile with a Profile object
$user->setCredentials([
'<strategy name>' => [
'some' => 'credentials'
]
]);
Edit this page on Github(opens new window)