User management

Users can be managed using the IUserManager service that can be :ref:`injected<dependency-injection>`.

Creating users

Creating a user is done by passing a username and password to the create method:

Modifying users

Users can be modified by getting a user by the userId or by a search pattern. The returned user objects can then be used to:

User session information

To login, logout or getting the currently logged in user, the IUserSession service that can be :ref:`injected<dependency-injection>`.

Then users can be logged in and out by using:

User objects

User objects can be acquired from the IUserManager::get method.

User managers

Nextcloud users can be defined as managers of other users. This is an informational property and has no influence on authorization. A user manager is not to confuse with admins or sub admins.