Closed cbiggins closed 4 years ago
On all requests that allow that property to be passed, it is already available.
During the create
calls, such as creating a user, you pass in the query array you want to pass
$user = new \Okta\Users\User();
$profile = new \Okta\Users\Profile();
$profile->setFirstName('John')
->setLastName('User')
->setLogin('auser@example.com')
->setEmail('auser@example.com');
$user->setProfile($profile);
$credentials = new \Okta\Users\Credentials();
$password = new \Okta\Users\Password();
$password->setPassword('Abcd1234!');
$recoveryQuestion = new \Okta\Users\RecoveryQuestion();
$recoveryQuestion->setQuestion('What Language do I write in?')
->setAnswer('PHP!');
$provider = new \Okta\Users\Provider();
$provider->setName('OKTA')
->setType('OKTA');
$credentials->setPassword($password);
$credentials->setRecoveryQuestion($recoveryQuestion);
$credentials->setProvider($provider);
$user->setCredentials($credentials);
$user->setGroupIds([
'00gajavp1anBX8svy0h7',
'00gajb08d19WCvbsC0h7'
]);
$user->create(['sendEmail' => false]);
There is an issue reported already to have the readme updated, and it will be addressed in #55
During development it'd be great to pass activate=false and sendEmail=false on all requests. I can't see anywhere in the code for this to be added, is it possible?
Also, I noticed that the README is outdated - it needs new class names.
Thanks guys!!