I can’t get my head around how the interface \OCP\UserInterface
is supposed to work and how the abstract class \OC\User\Backend
comes into play.
For example there is a deleteUser()
method in UserInterface
but no createUser()
. Both have implementsAction()
.
Does Nextcloud always go through the abstract Backend
to access a user backend, so that it knows that it knows whether there is a createUser
it can call although it is not part of the interface? For example \OC\User\Database
extends the abstract Backend
and also implements UserInterface
. Shouldn’t there be a single Interface for this, a single source of information?
I thought, maybe if the interface contained all methods, you would always have to implement them and sometimes you don’t want to allow an admin to create users, but then why is deleteUser()
part of the interface?
Can someone explain this to me? Is this just bad design (abstract class and interface required to implement a user backend) or necessitated by something that I don’t know?