Class MemberController
Inheritance
Namespace: Umbraco.Cms.Web.BackOffice.Controllers
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[Authorize(Policy = "SectionAccessMembers")]
[OutgoingNoHyphenGuidFormat]
public class MemberController : ContentControllerBase
Remarks
This controller is decorated with the UmbracoApplicationAuthorizeAttribute which means that any user requesting access to ALL of the methods on this controller will need access to the member application.
Constructors
View SourceMemberController(ICultureDictionary, ILoggerFactory, IShortStringHelper, IEventMessagesFactory, ILocalizedTextService, PropertyEditorCollection, IUmbracoMapper, IMemberService, IMemberTypeService, IMemberManager, IDataTypeService, IBackOfficeSecurityAccessor, IJsonSerializer, IPasswordChanger<MemberIdentityUser>, ICoreScopeProvider)
Declaration
public MemberController(ICultureDictionary cultureDictionary, ILoggerFactory loggerFactory, IShortStringHelper shortStringHelper, IEventMessagesFactory eventMessages, ILocalizedTextService localizedTextService, PropertyEditorCollection propertyEditors, IUmbracoMapper umbracoMapper, IMemberService memberService, IMemberTypeService memberTypeService, IMemberManager memberManager, IDataTypeService dataTypeService, IBackOfficeSecurityAccessor backOfficeSecurityAccessor, IJsonSerializer jsonSerializer, IPasswordChanger<MemberIdentityUser> passwordChanger, ICoreScopeProvider scopeProvider)
Parameters
Type | Name | Description |
---|---|---|
ICultureDictionary | cultureDictionary | |
Microsoft.Extensions.Logging.ILoggerFactory | loggerFactory | |
IShortStringHelper | shortStringHelper | |
IEventMessagesFactory | eventMessages | |
ILocalizedTextService | localizedTextService | |
PropertyEditorCollection | propertyEditors | |
IUmbracoMapper | umbracoMapper | |
IMemberService | memberService | |
IMemberTypeService | memberTypeService | |
IMemberManager | memberManager | |
IDataTypeService | dataTypeService | |
IBackOfficeSecurityAccessor | backOfficeSecurityAccessor | |
IJsonSerializer | jsonSerializer | |
IPasswordChanger<MemberIdentityUser> | passwordChanger | |
ICoreScopeProvider | scopeProvider |
MemberController(ICultureDictionary, ILoggerFactory, IShortStringHelper, IEventMessagesFactory, ILocalizedTextService, PropertyEditorCollection, IUmbracoMapper, IMemberService, IMemberTypeService, IMemberManager, IDataTypeService, IBackOfficeSecurityAccessor, IJsonSerializer, IPasswordChanger<MemberIdentityUser>, ICoreScopeProvider, ITwoFactorLoginService)
Initializes a new instance of the MemberController class.
Declaration
[ActivatorUtilitiesConstructor]
public MemberController(ICultureDictionary cultureDictionary, ILoggerFactory loggerFactory, IShortStringHelper shortStringHelper, IEventMessagesFactory eventMessages, ILocalizedTextService localizedTextService, PropertyEditorCollection propertyEditors, IUmbracoMapper umbracoMapper, IMemberService memberService, IMemberTypeService memberTypeService, IMemberManager memberManager, IDataTypeService dataTypeService, IBackOfficeSecurityAccessor backOfficeSecurityAccessor, IJsonSerializer jsonSerializer, IPasswordChanger<MemberIdentityUser> passwordChanger, ICoreScopeProvider scopeProvider, ITwoFactorLoginService twoFactorLoginService)
Parameters
Type | Name | Description |
---|---|---|
ICultureDictionary | cultureDictionary | The culture dictionary |
Microsoft.Extensions.Logging.ILoggerFactory | loggerFactory | The logger factory |
IShortStringHelper | shortStringHelper | The string helper |
IEventMessagesFactory | eventMessages | The event messages factory |
ILocalizedTextService | localizedTextService | The entry point for localizing key services |
PropertyEditorCollection | propertyEditors | The property editors |
IUmbracoMapper | umbracoMapper | The mapper |
IMemberService | memberService | The member service |
IMemberTypeService | memberTypeService | The member type service |
IMemberManager | memberManager | The member manager |
IDataTypeService | dataTypeService | The data-type service |
IBackOfficeSecurityAccessor | backOfficeSecurityAccessor | The back office security accessor |
IJsonSerializer | jsonSerializer | The JSON serializer |
IPasswordChanger<MemberIdentityUser> | passwordChanger | The password changer |
ICoreScopeProvider | scopeProvider | The core scope provider |
ITwoFactorLoginService | twoFactorLoginService | The two factor login service |
Methods
View SourceDeleteByKey(Guid)
Permanently deletes a member
Declaration
[HttpPost]
public IActionResult DeleteByKey(Guid key)
Parameters
Type | Name | Description |
---|---|---|
Guid | key | Guid of the member to delete |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Mvc.IActionResult | The result of the deletion |
ExportMemberData(Guid)
Exports member data based on their unique Id
Declaration
[HttpGet]
public IActionResult ExportMemberData(Guid key)
Parameters
Type | Name | Description |
---|---|---|
Guid | key | The unique |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Mvc.IActionResult |
GetByKey(Guid)
Gets the content json for the member
Declaration
public MemberDisplay? GetByKey(Guid key)
Parameters
Type | Name | Description |
---|---|---|
Guid | key | The Guid key of the member |
Returns
Type | Description |
---|---|
System.Nullable<MemberDisplay> | The member for display |
GetEmpty(String)
Gets an empty content item for the
Declaration
public ActionResult<MemberDisplay?> GetEmpty(string contentTypeAlias = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentTypeAlias | The content type |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<MemberDisplay>> | The empty member for display |
GetListNodeDisplay(String)
Returns a display node with a list view to render members
Declaration
public MemberListDisplay GetListNodeDisplay(string listName)
Parameters
Type | Name | Description |
---|---|---|
System.String | listName | The member type to list |
Returns
Type | Description |
---|---|
MemberListDisplay | The member list for display |
GetPagedResults(Int32, Int32, String, Direction, Boolean, String, String)
The paginated list of members
Declaration
public PagedResult<MemberBasic> GetPagedResults(int pageNumber = 1, int pageSize = 100, string orderBy = "username", Direction orderDirection = null, bool orderBySystemField = true, string filter = "", string memberTypeAlias = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pageNumber | The page number to display |
System.Int32 | pageSize | The size of the page |
System.String | orderBy | The ordering of the member list |
Direction | orderDirection | The direction of the member list |
System.Boolean | orderBySystemField | The system field to order by |
System.String | filter | The current filter for the list |
System.String | memberTypeAlias | The member type |
Returns
Type | Description |
---|---|
PagedResult<MemberBasic> | The paged result of members |
PostSave(MemberSave)
Saves member
Declaration
public async Task<ActionResult<MemberDisplay?>> PostSave([ModelBinder(typeof(MemberBinder))] MemberSave contentItem)
Parameters
Type | Name | Description |
---|---|---|
MemberSave | contentItem | The content item to save as a member |
Returns
Type | Description |
---|---|
Task<Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<MemberDisplay>>> | The resulting member display object |