Search Results for

    Show / Hide Table of Contents

    Interface IMemberRepository

    Namespace: Umbraco.Cms.Core.Persistence.Repositories
    Assembly: cs.temp.dll.dll
    Syntax
    public interface IMemberRepository : IContentRepository<int, IMember>

    Methods

    Exists(String)

    Checks if a member with the username exists

    Declaration
    bool Exists(string username)
    Parameters
    Type Name Description
    System.String username
    Returns
    Type Description
    System.Boolean

    FindMembersInRole(String, String, StringPropertyMatchType)

    Finds members in a given role

    Declaration
    IEnumerable<IMember> FindMembersInRole(string roleName, string usernameToMatch, StringPropertyMatchType matchType = null)
    Parameters
    Type Name Description
    System.String roleName
    System.String usernameToMatch
    StringPropertyMatchType matchType
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<IMember>

    GetByMemberGroup(String)

    Get all members in a specific group

    Declaration
    IEnumerable<IMember> GetByMemberGroup(string groupName)
    Parameters
    Type Name Description
    System.String groupName
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<IMember>

    GetByUsername(String)

    Declaration
    IMember GetByUsername(string username)
    Parameters
    Type Name Description
    System.String username
    Returns
    Type Description
    IMember

    GetCountByQuery(IQuery<IMember>)

    Gets the count of items based on a complex query

    Declaration
    int GetCountByQuery(IQuery<IMember> query)
    Parameters
    Type Name Description
    IQuery<IMember> query
    Returns
    Type Description
    System.Int32

    GetMemberIds(String[])

    Declaration
    int[] GetMemberIds(string[] names)
    Parameters
    Type Name Description
    System.String[] names
    Returns
    Type Description
    System.Int32[]

    SetLastLogin(String, DateTime)

    Sets a members last login date based on their username

    Declaration
    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.

    In This Article
    • Methods
      • Exists(String)
      • FindMembersInRole(String, String, StringPropertyMatchType)
      • GetByMemberGroup(String)
      • GetByUsername(String)
      • GetCountByQuery(IQuery<IMember>)
      • GetMemberIds(String[])
      • SetLastLogin(String, DateTime)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX