Interface IExternalMemberRepository
Defines the repository for external-only members that are not backed by the content system.
Namespace: Umbraco.Cms.Core.Persistence.Repositories
Assembly: Umbraco.Core.dll
Syntax
public interface IExternalMemberRepository
Methods
View SourceAssignRolesAsync(int, int[])
Assigns roles to an external member by database identities.
Declaration
Task AssignRolesAsync(int externalMemberId, int[] memberGroupIds)
Parameters
| Type | Name | Description |
|---|---|---|
| int | externalMemberId | The database identity of the external member. |
| int[] | memberGroupIds | The database identities of the member groups to assign. |
Returns
| Type | Description |
|---|---|
| Task |
CreateAsync(ExternalMemberIdentity)
Creates a new external member in the database.
Declaration
Task<int> CreateAsync(ExternalMemberIdentity member)
Parameters
| Type | Name | Description |
|---|---|---|
| ExternalMemberIdentity | member | The external member identity to create. |
Returns
| Type | Description |
|---|---|
| Task<int> | The database identity of the created external member. |
DeleteAsync(Guid)
Deletes an external member by its unique key.
Declaration
Task DeleteAsync(Guid key)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | key | The unique key of the external member to delete. |
Returns
| Type | Description |
|---|---|
| Task |
GetByEmailAsync(string)
Gets an external member by email address.
Declaration
Task<ExternalMemberIdentity?> GetByEmailAsync(string email)
Parameters
| Type | Name | Description |
|---|---|---|
| string | The email address to search for. |
Returns
| Type | Description |
|---|---|
| Task<ExternalMemberIdentity> | The ExternalMemberIdentity if found; otherwise |
GetByKeyAsync(Guid)
Gets an external member by its unique key.
Declaration
Task<ExternalMemberIdentity?> GetByKeyAsync(Guid key)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | key | The unique identifier of the external member. |
Returns
| Type | Description |
|---|---|
| Task<ExternalMemberIdentity> | The ExternalMemberIdentity if found; otherwise |
GetByUsernameAsync(string)
Gets an external member by username.
Declaration
Task<ExternalMemberIdentity?> GetByUsernameAsync(string username)
Parameters
| Type | Name | Description |
|---|---|---|
| string | username | The username to search for. |
Returns
| Type | Description |
|---|---|
| Task<ExternalMemberIdentity> | The ExternalMemberIdentity if found; otherwise |
GetPagedAsync(int, int)
Gets a paged collection of external members.
Declaration
Task<PagedModel<ExternalMemberIdentity>> GetPagedAsync(int skip, int take)
Parameters
| Type | Name | Description |
|---|---|---|
| int | skip | The number of items to skip. |
| int | take | The number of items to take. |
Returns
| Type | Description |
|---|---|
| Task<PagedModel<ExternalMemberIdentity>> | A PagedModel<T> containing the external members. |
GetRolesAsync(Guid)
Gets the role names assigned to an external member.
Declaration
Task<IEnumerable<string>> GetRolesAsync(Guid memberKey)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | memberKey | The unique key of the external member. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<string>> | A collection of role names. |
RemoveRolesAsync(int, int[])
Removes roles from an external member by database identities.
Declaration
Task RemoveRolesAsync(int externalMemberId, int[] memberGroupIds)
Parameters
| Type | Name | Description |
|---|---|---|
| int | externalMemberId | The database identity of the external member. |
| int[] | memberGroupIds | The database identities of the member groups to remove. |
Returns
| Type | Description |
|---|---|
| Task |
UpdateAsync(ExternalMemberIdentity)
Updates an existing external member in the database.
Declaration
Task UpdateAsync(ExternalMemberIdentity member)
Parameters
| Type | Name | Description |
|---|---|---|
| ExternalMemberIdentity | member | The external member identity to update. |
Returns
| Type | Description |
|---|---|
| Task |
UpdateLoginPropertiesAsync(ExternalMemberIdentity)
Updates only the login-related properties of an external member.
Declaration
Task UpdateLoginPropertiesAsync(ExternalMemberIdentity member)
Parameters
| Type | Name | Description |
|---|---|---|
| ExternalMemberIdentity | member | The external member identity carrying the new values. |
Returns
| Type | Description |
|---|---|
| Task |
Remarks
Sets lastLoginDate and securityStamp only. Deliberately does not
touch updateDate — login is not treated as a member update, and consequently the
member index is not refreshed. Does not perform uniqueness checks or full DTO mapping.