I’m wondering if someone know more about what is happening when using the command occ group:adduser.
My users is from a oidc so they are in the oc_user_oidc table in the database.
I’ve tried to look in the code but it looks a bit complicated. It sends the call to some kind of backend if I understand correctly from here server/lib/private/Group/Group.php at master · nextcloud/server · GitHub but don’t know what that is or what it does since there are lots of “addToGroup”.
Is it only adding the user to the oc_group_user table or can it do something more/else?
Basically speaking, it can do anything. In fact, you are not able to statically determine what will happen. In fact, there are events involved. This means that certain (more or less) important situations are publicly (in the code case) signaled for reaction.
E.g. each NC app might listen to these events and react to them. So, you would have to take all apps into consideration.
This should answer the question “can it do more?”
Quick summary about the backend system:
There was the need for a modular system to manage the users. For example to let apps add new backends like ldap, ftp or whatever you could think of. Each backend manages its own set of users (you can have a mix of users in your instance, some local, some from LDAP etc).
To allow for a common management, there were a set of interfaces defined that each backend must obey. Some methods are mandatory (you will always have to check if a user with given user id is know) but others are not. Thus, there are methods to query the capabilities of the backends installed and eventually throw human readable errors.
I will not go further into detail, feel free to ask. We can then dig into the code if you need this.