Table of Contents
These v19 docs are archived 🔒. Go to the latest docs home or try if this exact page is available in the latest docs.

Interface IUserService

Namespace
ToSic.Sxc.Services
Assembly
ToSic.Sxc.dll

Service on Kit.User to get users and roles of the platform.

[PublicApi]
public interface IUserService

Remarks

History: Released in 19.02 after being internal since 15.03.

Methods

GetRoles()

Get all user roles.

IEnumerable<IUserRoleModel> GetRoles()

Returns

IEnumerable<IUserRoleModel>

GetUser(int)

Get a user by id.

IUserModel GetUser(int id)

Parameters

id int

the user id

Returns

IUserModel

If found, a user model containing the user specs. If not found, a user model containing the unknown user specs.

GetUser(string)

Get a user by nameId.

IUserModel GetUser(string nameId)

Parameters

nameId string

The nameID which is the identity token like dnn:42.

Returns

IUserModel

If found, a user model containing the user specs. If not found, a user model containing the unknown user specs.

GetUsers()

Get all users.

IEnumerable<IUserModel> GetUsers()

Returns

IEnumerable<IUserModel>