Automatic User creation + Random Password + Expire Time

Hey dear Nextcloud Community :slight_smile:

So i have to code a PHP script and I really need some help.

The Scenario:

The User fill out and submit a Form, which I already have.

The script has the following tasks:

  1. It should create automatically a new user + a random generated password

  2. This Account should expire after 14 days.

  3. The user should get an email with his login details

  4. The submited form should be added to a Nextcloud folder

Is there any chance to get this constellation running?

best regards