How to create user without password

I am writing an application in which I need to create users without setting a password. The user will receive an email and set the password himself.
This is how it works with the ‘+New User’ button in users page.
I want to do it in php from my app.
$user = $this->userManager->createUser($loginName, $password);
requires a password.

How to create a user without password? like ‘+New User’ button in users page
Thank you for your help

I answer this question myself if it can help other people!

It’s not possible to create a user without a password but it is possible to generate a random password and to trigger the reset of the password afterwards.
Very good example @ apps/provisioning_api/lib/Controller/UsersController.php with AddUser()

Have a good day!