Hello,
My motivation are:
- custom user creation process done programmatically, which includes: give uniq login name based on naming convention, create a new user with custom login, create a folder on other account for shared storage, copy custom folder content in the shared folder, create shares with readonly and readwrite permissions, generate user’s password, or send it onetime login link. etc.
- when the process is automated provide a limited non-programmer UI interface for a manager in order to create a new user. Such interface purpose is to speed up creation steps, limit creation mistake and to give separated input fields: Firstname, Lastname, email
- Automatically call the custom creation process defined in 1. (could be achieved by a cron task fetching the pending user to be created)
As you’ve suggested Guests app may provide some of this functionality. I’m also exploring it.
My main difficulty is not to perform the custom creation process, but to provide a way to trigger it for a manager point of view without technical knowledge… given I’m not a php developer, other wise I would have followed custom app tutorial and probably solved it since a week now.
My other motivation is also exploring Nextcloud potentials features on designing/providing UI forms with structured data and related APIs.
The user creation form (Admin > Users > New User) you’ve mentioned, is great for normal user creation process, not for custom one actually.
I re-tested it, it allows empty password despite it’s displayed as required.
Actually I could have chosen the “new user” form. If I could have assumed “Display name” could be “Firstname Lastname” is that order, so I could parse it. What about composed Firstname or Lastname?
(ex: Jean Yves Du Guy) Firstname: Jean Yves , Lastname: Du Guy
So I could have requiring the manager to only fill:
- Username (temporary one before rename, need to be unique)
- Display name
- email
- group empty, or a dedicated New_user may would be better. Actually I did that already.
I think it’s a bit confusing.
Then I could get the newly created user from SQL, for example:
“list uid who are not in any group”
select u.uid
from oc_users as u
left join oc_group_user as g on u.uid = g.uid
where g.uid is null;
or list user from new_user group (aka, pending user to be created)
select * from oc_group_user where gid = 'new_user';
occ can also somewhat achieve it too (you’ve to filter by yourselves, user in no group are not listed):
occ group:list
Then I can perform my custom creation on the retrieved list.
I hope it’s a bit more clear, sorry for the confusion.