Class MemberService
Represents the MemberService.
Namespace: Umbraco.Core.Services.Implement
Assembly: Umbraco.Core.dll
Syntax
public class MemberService : ScopeRepositoryService, IMemberService, IMembershipMemberService, IMembershipMemberService<IMember>, IService, IMembershipRoleService<IMember>
Constructors
View SourceMemberService(IScopeProvider, ILogger, IEventMessagesFactory, IMemberGroupService, IMediaFileSystem, IMemberRepository, IMemberTypeRepository, IMemberGroupRepository, IAuditRepository)
Declaration
public MemberService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IMemberGroupService memberGroupService, IMediaFileSystem mediaFileSystem, IMemberRepository memberRepository, IMemberTypeRepository memberTypeRepository, IMemberGroupRepository memberGroupRepository, IAuditRepository auditRepository)
Parameters
Type | Name | Description |
---|---|---|
IScopeProvider | provider | |
ILogger | logger | |
IEventMessagesFactory | eventMessagesFactory | |
IMemberGroupService | memberGroupService | |
IMediaFileSystem | mediaFileSystem | |
IMemberRepository | memberRepository | |
IMemberTypeRepository | memberTypeRepository | |
IMemberGroupRepository | memberGroupRepository | |
IAuditRepository | auditRepository |
Methods
View SourceAddRole(String)
Declaration
public void AddRole(string roleName)
Parameters
Type | Name | Description |
---|---|---|
System.String | roleName |
AssignRole(Int32, String)
Declaration
public void AssignRole(int memberId, string roleName)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | memberId | |
System.String | roleName |
AssignRole(String, String)
Declaration
public void AssignRole(string username, string roleName)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.String | roleName |
AssignRoles(Int32[], String[])
Declaration
public void AssignRoles(int[] memberIds, string[] roleNames)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | memberIds | |
System.String[] | roleNames |
AssignRoles(String[], String[])
Declaration
public void AssignRoles(string[] usernames, string[] roleNames)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | usernames | |
System.String[] | roleNames |
Count(String)
Gets the count of Members by an optional MemberType alias
Declaration
public int Count(string memberTypeAlias = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | memberTypeAlias | Optional alias for the MemberType when counting number of Members |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
If no alias is supplied then the count for all Member will be returned
CreateMember(String, String, String, String)
Creates an IMember object without persisting it
Declaration
public IMember CreateMember(string username, string email, string name, string memberTypeAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | Username of the Member to create |
System.String | Email of the Member to create |
|
System.String | name | Name of the Member to create |
System.String | memberTypeAlias | Alias of the MemberType the Member should be based on |
Returns
Type | Description |
---|---|
IMember | IMember |
Remarks
This method is convenient for when you need to add properties to a new Member before persisting it in order to limit the amount of times its saved. Also note that the returned IMember will not have an Id until its saved.
CreateMember(String, String, String, IMemberType)
Creates an IMember object without persisting it
Declaration
public IMember CreateMember(string username, string email, string name, IMemberType memberType)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | Username of the Member to create |
System.String | Email of the Member to create |
|
System.String | name | Name of the Member to create |
IMemberType | memberType | MemberType the Member should be based on |
Returns
Type | Description |
---|---|
IMember | IMember |
Remarks
This method is convenient for when you need to add properties to a new Member before persisting it in order to limit the amount of times its saved. Also note that the returned IMember will not have an Id until its saved.
CreateMemberWithIdentity(String, String, String)
Declaration
public IMember CreateMemberWithIdentity(string username, string email, string memberTypeAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.String | ||
System.String | memberTypeAlias |
Returns
Type | Description |
---|---|
IMember |
CreateMemberWithIdentity(String, String, String, Boolean)
Declaration
public IMember CreateMemberWithIdentity(string username, string email, string memberTypeAlias, bool isApproved)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.String | ||
System.String | memberTypeAlias | |
System.Boolean | isApproved |
Returns
Type | Description |
---|---|
IMember |
CreateMemberWithIdentity(String, String, String, String)
Declaration
public IMember CreateMemberWithIdentity(string username, string email, string name, string memberTypeAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.String | ||
System.String | name | |
System.String | memberTypeAlias |
Returns
Type | Description |
---|---|
IMember |
CreateMemberWithIdentity(String, String, String, String, Boolean)
Declaration
public IMember CreateMemberWithIdentity(string username, string email, string name, string memberTypeAlias, bool isApproved)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.String | ||
System.String | name | |
System.String | memberTypeAlias | |
System.Boolean | isApproved |
Returns
Type | Description |
---|---|
IMember |
CreateMemberWithIdentity(String, String, String, String, String, Boolean)
Creates and persists a Member
Declaration
public IMember CreateMemberWithIdentity(string username, string email, string name, string passwordValue, string memberTypeAlias, bool isApproved = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | Username of the Member to create |
System.String | Email of the Member to create |
|
System.String | name | Name of the Member to create |
System.String | passwordValue | |
System.String | memberTypeAlias | Alias of the MemberType the Member should be based on |
System.Boolean | isApproved | Optional IsApproved of the Member to create |
Returns
Type | Description |
---|---|
IMember | IMember |
Remarks
Using this method will persist the Member object before its returned meaning that it will have an Id available (unlike the CreateMember method)
CreateMemberWithIdentity(String, String, String, IMemberType)
Declaration
public IMember CreateMemberWithIdentity(string username, string email, string name, IMemberType memberType)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.String | ||
System.String | name | |
IMemberType | memberType |
Returns
Type | Description |
---|---|
IMember |
CreateMemberWithIdentity(String, String, String, IMemberType, Boolean)
Creates and persists a Member
Declaration
public IMember CreateMemberWithIdentity(string username, string email, string name, IMemberType memberType, bool isApproved)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | Username of the Member to create |
System.String | Email of the Member to create |
|
System.String | name | Name of the Member to create |
IMemberType | memberType | MemberType the Member should be based on |
System.Boolean | isApproved |
Returns
Type | Description |
---|---|
IMember | IMember |
Remarks
Using this method will persist the Member object before its returned meaning that it will have an Id available (unlike the CreateMember method)
CreateMemberWithIdentity(String, String, IMemberType)
Declaration
public IMember CreateMemberWithIdentity(string username, string email, IMemberType memberType)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.String | ||
IMemberType | memberType |
Returns
Type | Description |
---|---|
IMember |
CreateMemberWithIdentity(String, String, IMemberType, Boolean)
Creates and persists a Member
Declaration
public IMember CreateMemberWithIdentity(string username, string email, IMemberType memberType, bool isApproved)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | Username of the Member to create |
System.String | Email of the Member to create |
|
IMemberType | memberType | MemberType the Member should be based on |
System.Boolean | isApproved |
Returns
Type | Description |
---|---|
IMember | IMember |
Remarks
Using this method will persist the Member object before its returned meaning that it will have an Id available (unlike the CreateMember method)
Delete(IMember)
Deletes an IMember
Declaration
public void Delete(IMember member)
Parameters
Type | Name | Description |
---|---|---|
IMember | member | IMember to Delete |
DeleteMembersOfType(Int32)
Delete Members of the specified MemberType id
Declaration
public void DeleteMembersOfType(int memberTypeId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | memberTypeId | Id of the MemberType |
DeleteRole(String, Boolean)
Declaration
public bool DeleteRole(string roleName, bool throwIfBeingUsed)
Parameters
Type | Name | Description |
---|---|---|
System.String | roleName | |
System.Boolean | throwIfBeingUsed |
Returns
Type | Description |
---|---|
System.Boolean |
DissociateRole(Int32, String)
Declaration
public void DissociateRole(int memberId, string roleName)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | memberId | |
System.String | roleName |
DissociateRole(String, String)
Declaration
public void DissociateRole(string username, string roleName)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.String | roleName |
DissociateRoles(Int32[], String[])
Declaration
public void DissociateRoles(int[] memberIds, string[] roleNames)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | memberIds | |
System.String[] | roleNames |
DissociateRoles(String[], String[])
Declaration
public void DissociateRoles(string[] usernames, string[] roleNames)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | usernames | |
System.String[] | roleNames |
Exists(Int32)
Checks if a Member with the id exists
Declaration
public bool Exists(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | Id of the Member |
Returns
Type | Description |
---|---|
System.Boolean |
|
Exists(String)
Checks if a Member with the username exists
Declaration
public bool Exists(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | Username to check |
Returns
Type | Description |
---|---|
System.Boolean |
|
FindByEmail(String, Int64, Int32, out Int64, StringPropertyMatchType)
Finds a list of IMember objects by a partial email string
Declaration
public IEnumerable<IMember> FindByEmail(string emailStringToMatch, long pageIndex, int pageSize, out long totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
Parameters
Type | Name | Description |
---|---|---|
System.String | emailStringToMatch | Partial email string to match |
System.Int64 | pageIndex | Current page index |
System.Int32 | pageSize | Size of the page |
System.Int64 | totalRecords | Total number of records found (out) |
StringPropertyMatchType | matchType | The type of match to make as StringPropertyMatchType. Default is StartsWith |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
FindByUsername(String, Int64, Int32, out Int64, StringPropertyMatchType)
Finds a list of IMember objects by a partial username
Declaration
public IEnumerable<IMember> FindByUsername(string login, long pageIndex, int pageSize, out long totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
Parameters
Type | Name | Description |
---|---|---|
System.String | login | Partial username to match |
System.Int64 | pageIndex | Current page index |
System.Int32 | pageSize | Size of the page |
System.Int64 | totalRecords | Total number of records found (out) |
StringPropertyMatchType | matchType | The type of match to make as StringPropertyMatchType. Default is StartsWith |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
FindMembersByDisplayName(String, Int64, Int32, out Int64, StringPropertyMatchType)
Finds Members based on their display name
Declaration
public IEnumerable<IMember> FindMembersByDisplayName(string displayNameToMatch, long pageIndex, int pageSize, out long totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
Parameters
Type | Name | Description |
---|---|---|
System.String | displayNameToMatch | Display name to match |
System.Int64 | pageIndex | Current page index |
System.Int32 | pageSize | Size of the page |
System.Int64 | totalRecords | Total number of records found (out) |
StringPropertyMatchType | matchType | The type of match to make as StringPropertyMatchType. Default is StartsWith |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
FindMembersInRole(String, String, StringPropertyMatchType)
Declaration
public IEnumerable<IMember> FindMembersInRole(string roleName, string usernameToMatch, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
Parameters
Type | Name | Description |
---|---|---|
System.String | roleName | |
System.String | usernameToMatch | |
StringPropertyMatchType | matchType |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> |
GetAll(Int64, Int32, out Int64)
Gets a list of paged IMember objects
Declaration
public IEnumerable<IMember> GetAll(long pageIndex, int pageSize, out long totalRecords)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | pageIndex | Current page index |
System.Int32 | pageSize | Size of the page |
System.Int64 | totalRecords | Total number of records found (out) |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
GetAll(Int64, Int32, out Int64, String, Direction, Boolean, String, String)
Declaration
public IEnumerable<IMember> GetAll(long pageIndex, int pageSize, out long totalRecords, string orderBy, Direction orderDirection, bool orderBySystemField, string memberTypeAlias, string filter)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | pageIndex | |
System.Int32 | pageSize | |
System.Int64 | totalRecords | |
System.String | orderBy | |
Direction | orderDirection | |
System.Boolean | orderBySystemField | |
System.String | memberTypeAlias | |
System.String | filter |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> |
GetAll(Int64, Int32, out Int64, String, Direction, String, String)
Declaration
public IEnumerable<IMember> GetAll(long pageIndex, int pageSize, out long totalRecords, string orderBy, Direction orderDirection, string memberTypeAlias = null, string filter = "")
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | pageIndex | |
System.Int32 | pageSize | |
System.Int64 | totalRecords | |
System.String | orderBy | |
Direction | orderDirection | |
System.String | memberTypeAlias | |
System.String | filter |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> |
GetAllMembers(Int32[])
Gets all Members with the ids specified
Declaration
public IEnumerable<IMember> GetAllMembers(params int[] ids)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | ids | Optional list of Member Ids |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
Remarks
If no Ids are specified all Members will be retrieved
GetAllRoles()
Declaration
public IEnumerable<string> GetAllRoles()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
GetAllRoles(Int32)
Declaration
public IEnumerable<string> GetAllRoles(int memberId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | memberId |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
GetAllRoles(String)
Declaration
public IEnumerable<string> GetAllRoles(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
GetAllRolesIds()
Declaration
public IEnumerable<int> GetAllRolesIds()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Int32> |
GetAllRolesIds(Int32)
Declaration
public IEnumerable<int> GetAllRolesIds(int memberId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | memberId |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Int32> |
GetAllRolesIds(String)
Declaration
public IEnumerable<int> GetAllRolesIds(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Int32> |
GetByEmail(String)
Get an IMember by email
Declaration
public IMember GetByEmail(string email)
Parameters
Type | Name | Description |
---|---|---|
System.String | Email to use for retrieval |
Returns
Type | Description |
---|---|
IMember | IMember |
GetById(Int32)
Gets a Member by its integer id
Declaration
public IMember GetById(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id |
Returns
Type | Description |
---|---|
IMember | IMember |
GetByKey(Guid)
Gets a Member by the unique key
Declaration
public IMember GetByKey(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | System.Guid Id |
Returns
Type | Description |
---|---|
IMember | IMember |
Remarks
The guid key corresponds to the unique id in the database and the user id in the membership provider.
GetByProviderKey(Object)
Gets an IMember by its provider key
Declaration
public IMember GetByProviderKey(object id)
Parameters
Type | Name | Description |
---|---|---|
System.Object | id | Id to use for retrieval |
Returns
Type | Description |
---|---|
IMember | IMember |
GetByUsername(String)
Get an IMember by username
Declaration
public IMember GetByUsername(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | Username to use for retrieval |
Returns
Type | Description |
---|---|
IMember | IMember |
GetCount(MemberCountType)
Gets the total number of Members based on the count type
Declaration
public int GetCount(MemberCountType countType)
Parameters
Type | Name | Description |
---|---|---|
MemberCountType | countType | MemberCountType to count by |
Returns
Type | Description |
---|---|
System.Int32 |
Remarks
The way the Online count is done is the same way that it is done in the MS SqlMembershipProvider - We query for any members that have their last active date within the Membership.UserIsOnlineTimeWindow (which is in minutes). It isn't exact science but that is how MS have made theirs so we'll follow that principal.
GetDefaultMemberType()
Declaration
public string GetDefaultMemberType()
Returns
Type | Description |
---|---|
System.String |
GetMembersByGroup(String)
Gets all Members within the specified MemberGroup name
Declaration
public IEnumerable<IMember> GetMembersByGroup(string memberGroupName)
Parameters
Type | Name | Description |
---|---|---|
System.String | memberGroupName | Name of the MemberGroup |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
GetMembersByMemberType(Int32)
Gets all Members for the MemberType id
Declaration
public IEnumerable<IMember> GetMembersByMemberType(int memberTypeId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | memberTypeId | Id of the MemberType |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
GetMembersByMemberType(String)
Gets all Members for the specified MemberType alias
Declaration
public IEnumerable<IMember> GetMembersByMemberType(string memberTypeAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | memberTypeAlias | Alias of the MemberType |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
GetMembersByPropertyValue(String, Boolean)
Gets a list of Members based on a property search
Declaration
public IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyTypeAlias | Alias of the PropertyType to search for |
System.Boolean | value |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
GetMembersByPropertyValue(String, DateTime, ValuePropertyMatchType)
Gets a list of Members based on a property search
Declaration
public IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, DateTime value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyTypeAlias | Alias of the PropertyType to search for |
System.DateTime | value | System.DateTime Value to match |
ValuePropertyMatchType | matchType | The type of match to make as StringPropertyMatchType. Default is Exact |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
GetMembersByPropertyValue(String, Int32, ValuePropertyMatchType)
Gets a list of Members based on a property search
Declaration
public IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, int value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyTypeAlias | Alias of the PropertyType to search for |
System.Int32 | value | |
ValuePropertyMatchType | matchType | The type of match to make as StringPropertyMatchType. Default is Exact |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
GetMembersByPropertyValue(String, String, StringPropertyMatchType)
Gets a list of Members based on a property search
Declaration
public IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, string value, StringPropertyMatchType matchType = StringPropertyMatchType.Exact)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyTypeAlias | Alias of the PropertyType to search for |
System.String | value | |
StringPropertyMatchType | matchType | The type of match to make as StringPropertyMatchType. Default is Exact |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> | System.Collections.Generic.IEnumerable<T> |
GetMembersInRole(String)
Declaration
public IEnumerable<IMember> GetMembersInRole(string roleName)
Parameters
Type | Name | Description |
---|---|---|
System.String | roleName |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMember> |
Save(IEnumerable<IMember>, Boolean)
Saves a list of IMembershipUser objects
Declaration
public void Save(IEnumerable<IMember> members, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IMember> | members | |
System.Boolean | raiseEvents | Optional parameter to raise events.
Default is |
Remarks
An IMembershipUser can be of type IMember or IUser
Save(IMember, Boolean)
Saves an IMembershipUser
Declaration
public void Save(IMember member, bool raiseEvents = true)
Parameters
Type | Name | Description |
---|---|---|
IMember | member | |
System.Boolean | raiseEvents | Optional parameter to raise events.
Default is |
Remarks
An IMembershipUser can be of type IMember or IUser
SavePassword(IMember, String)
This is simply a helper method which essentially just wraps the MembershipProvider's ChangePassword method
Declaration
public void SavePassword(IMember member, string password)
Parameters
Type | Name | Description |
---|---|---|
IMember | member | The Member to save the password for |
System.String | password | The password to encrypt and save |
Remarks
This method exists so that Umbraco developers can use one entry point to create/update Members if they choose to.
SetLastLogin(String, DateTime)
Sets the last login date for the member if they are found by username
Declaration
public void SetLastLogin(string username, DateTime date)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.DateTime | date |
Remarks
This is a specialized method because whenever a member logs in, the membership provider requires us to set the 'online' which requires updating their login date. This operation must be fast and cannot use database locks which is fine if we are only executing a single query for this data since there won't be any other data contention issues.
Events
View SourceAssignedRoles
Occurs after roles have been assigned.
Declaration
public static event TypedEventHandler<IMemberService, RolesEventArgs> AssignedRoles
Event Type
Type | Description |
---|---|
TypedEventHandler<IMemberService, RolesEventArgs> |
Deleted
Occurs after Delete
Declaration
public static event TypedEventHandler<IMemberService, DeleteEventArgs<IMember>> Deleted
Event Type
Type | Description |
---|---|
TypedEventHandler<IMemberService, DeleteEventArgs<IMember>> |
Deleting
Occurs before Delete
Declaration
public static event TypedEventHandler<IMemberService, DeleteEventArgs<IMember>> Deleting
Event Type
Type | Description |
---|---|
TypedEventHandler<IMemberService, DeleteEventArgs<IMember>> |
RemovedRoles
Occurs after roles have been removed.
Declaration
public static event TypedEventHandler<IMemberService, RolesEventArgs> RemovedRoles
Event Type
Type | Description |
---|---|
TypedEventHandler<IMemberService, RolesEventArgs> |
Saved
Occurs after Save
Declaration
public static event TypedEventHandler<IMemberService, SaveEventArgs<IMember>> Saved
Event Type
Type | Description |
---|---|
TypedEventHandler<IMemberService, SaveEventArgs<IMember>> |
Saving
Occurs before Save
Declaration
public static event TypedEventHandler<IMemberService, SaveEventArgs<IMember>> Saving
Event Type
Type | Description |
---|---|
TypedEventHandler<IMemberService, SaveEventArgs<IMember>> |
Explicit Interface Implementations
View SourceIMembershipMemberService<IMember>.CreateWithIdentity(String, String, String, String)
Creates and persists a new IMember
Declaration
IMember IMembershipMemberService<IMember>.CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | Username of the IMembershipUser to create |
System.String | Email of the IMembershipUser to create |
|
System.String | passwordValue | This value should be the encoded/encrypted/hashed value for the password that will be stored in the database |
System.String | memberTypeAlias | Alias of the Type |
Returns
Type | Description |
---|---|
IMember | IMember |
Remarks
An IMembershipUser can be of type IMember or IUser
IMembershipMemberService<IMember>.CreateWithIdentity(String, String, String, String, Boolean)
Creates and persists a new IMember
Declaration
IMember IMembershipMemberService<IMember>.CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias, bool isApproved)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | Username of the IMembershipUser to create |
System.String | Email of the IMembershipUser to create |
|
System.String | passwordValue | This value should be the encoded/encrypted/hashed value for the password that will be stored in the database |
System.String | memberTypeAlias | Alias of the Type |
System.Boolean | isApproved |
Returns
Type | Description |
---|---|
IMember | IMember |
Remarks
An IMembershipUser can be of type IMember or IUser