View Source
Class UsersController
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
[PluginController("UmbracoApi")]
public class UsersController : UmbracoAuthorizedJsonController, IDiscoverable
Constructors
View Source
UsersController(IGlobalSettings, IUmbracoContextAccessor, ISqlContext, ServiceContext, AppCaches, IProfilingLogger, IRuntimeState, UmbracoHelper, IUmbracoSettingsSection)
Declaration
public UsersController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper, IUmbracoSettingsSection umbracoSettingsSection)
Parameters
Methods
View Source
GetById(Int32)
Declaration
public UserDisplay GetById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
GetByIds(Int32[])
Declaration
public IEnumerable<UserDisplay> GetByIds(int[] ids)
Parameters
Type |
Name |
Description |
System.Int32[] |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<UserDisplay> |
|
View Source
GetCurrentUserAvatarUrls()
Returns a list of the sizes of gravatar URLs for the user or null if the gravatar server cannot be reached
Declaration
public string[] GetCurrentUserAvatarUrls()
Returns
Type |
Description |
System.String[] |
|
View Source
GetPagedUsers(Int32, Int32, String, Direction, String[], UserState[], String)
Returns a paged users collection
Declaration
public UsersController.PagedUserResult GetPagedUsers(int pageNumber = 1, int pageSize = 10, string orderBy = "username", Direction orderDirection = Direction.Ascending, string[] userGroups = null, UserState[] userStates = null, string filter = "")
Parameters
Type |
Name |
Description |
System.Int32 |
pageNumber |
|
System.Int32 |
pageSize |
|
System.String |
orderBy |
|
Direction |
orderDirection |
|
System.String[] |
userGroups |
|
UserState[] |
userStates |
|
System.String |
filter |
|
Returns
View Source
PostChangePassword(ChangingPasswordModel)
Declaration
public async Task<ModelWithNotifications<string>> PostChangePassword(ChangingPasswordModel changingPasswordModel)
Parameters
Returns
View Source
PostClearAvatar(Int32)
Declaration
public HttpResponseMessage PostClearAvatar(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostCreateUser(UserInvite)
Declaration
public async Task<UserDisplay> PostCreateUser(UserInvite userSave)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<UserDisplay> |
|
View Source
PostDeleteNonLoggedInUser(Int32)
Deletes the non-logged in user provided id
Declaration
public HttpResponseMessage PostDeleteNonLoggedInUser(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
User Id
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostDisableUsers(Int32[])
Disables the users with the given user ids
Declaration
public HttpResponseMessage PostDisableUsers(int[] userIds)
Parameters
Type |
Name |
Description |
System.Int32[] |
userIds |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostEnableUsers(Int32[])
Enables the users with the given user ids
Declaration
public HttpResponseMessage PostEnableUsers(int[] userIds)
Parameters
Type |
Name |
Description |
System.Int32[] |
userIds |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostInviteUser(UserInvite)
Declaration
public async Task<UserDisplay> PostInviteUser(UserInvite userSave)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<UserDisplay> |
|
View Source
PostSaveUser(UserSave)
Declaration
public UserDisplay PostSaveUser(UserSave userSave)
Parameters
Returns
View Source
PostSetAvatar(Int32)
Declaration
public async Task<HttpResponseMessage> PostSetAvatar(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<HttpResponseMessage> |
|
View Source
PostSetUserGroupsOnUsers(String[], Int32[])
Declaration
public HttpResponseMessage PostSetUserGroupsOnUsers(string[] userGroupAliases, int[] userIds)
Parameters
Type |
Name |
Description |
System.String[] |
userGroupAliases |
|
System.Int32[] |
userIds |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostUnlockUsers(Int32[])
Unlocks the users with the given user ids
Declaration
public async Task<HttpResponseMessage> PostUnlockUsers(int[] userIds)
Parameters
Type |
Name |
Description |
System.Int32[] |
userIds |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<HttpResponseMessage> |
|