RoleService.GetRolesForUser Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

GetRolesForUser(int, bool, bool)

Gets the Roles that the User is a member of.

public static IEnumerable<Role> GetRolesForUser(int userId, bool sudo = false, bool trashed = false)

Parameters

userId
int

Id of the User for which to get Roles.

sudo
bool

true to perform action as super user, otherwise false.

trashed
bool

true to return trashed roles, otherwise false.

Returns

System.Collections.Generic.IEnumerable

Returns a list of Role objects.