'{username}', 'apiKey' => '{apiKey}', )); // Set up Identity service $service = $client->identityService(); // Create user $user = $service->createUser(array( 'username' => '{username}', // replace username 'email' => '{email}', // replace email address 'enabled' => true, )); // If you do not provide a "password" key in the createUser operation, the API // will automatically generate you one. If that's the case, you will need to // retrieve the new password and save it somewhere. echo $user->getPassword();