How can I set a user password after I already made that user without a password

So, my app goes like this:

  • The admin creates a new user with username and email
  • Then an email is send to the user to set his password

Now, the first part works, I creates an user with a null password but I can’t figure out how to set the user password, any advice?