Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IUserRepository

    Namespace: Umbraco.Cms.Core.Persistence.Repositories
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IUserRepository : IReadWriteQueryRepository<int, IUser>, IReadRepository<int, IUser>, IWriteRepository<IUser>, IQueryRepository<IUser>, IRepository

    Methods

    View Source

    ClearLoginSession(Guid)

    Declaration
    void ClearLoginSession(Guid sessionId)
    Parameters
    Type Name Description
    Guid sessionId
    View Source

    ClearLoginSessions(Int32)

    Declaration
    int ClearLoginSessions(int userId)
    Parameters
    Type Name Description
    System.Int32 userId
    Returns
    Type Description
    System.Int32
    View Source

    ClearLoginSessions(TimeSpan)

    Declaration
    int ClearLoginSessions(TimeSpan timespan)
    Parameters
    Type Name Description
    TimeSpan timespan
    Returns
    Type Description
    System.Int32
    View Source

    CreateLoginSession(Nullable<Int32>, String, Boolean)

    Declaration
    Guid CreateLoginSession(int? userId, string requestingIpAddress, bool cleanStaleSessions = true)
    Parameters
    Type Name Description
    System.Nullable<System.Int32> userId
    System.String requestingIpAddress
    System.Boolean cleanStaleSessions
    Returns
    Type Description
    Guid
    View Source

    ExistsByLogin(String)

    Checks if a user with the login exists

    Declaration
    bool ExistsByLogin(string login)
    Parameters
    Type Name Description
    System.String login
    Returns
    Type Description
    System.Boolean
    View Source

    ExistsByUserName(String)

    Checks if a user with the username exists

    Declaration
    bool ExistsByUserName(string username)
    Parameters
    Type Name Description
    System.String username
    Returns
    Type Description
    System.Boolean
    View Source

    Get(Nullable<Int32>, Boolean)

    Returns a user by id

    Declaration
    IUser Get(int? id, bool includeSecurityData)
    Parameters
    Type Name Description
    System.Nullable<System.Int32> id
    System.Boolean includeSecurityData

    This is only used for a shim in order to upgrade to 7.7

    Returns
    Type Description
    IUser

    A non cached IUser instance

    View Source

    GetAllInGroup(Int32)

    Gets a list of IUser objects associated with a given group

    Declaration
    IEnumerable<IUser> GetAllInGroup(int groupId)
    Parameters
    Type Name Description
    System.Int32 groupId

    Id of group

    Returns
    Type Description
    IEnumerable<IUser>
    View Source

    GetAllNotInGroup(Int32)

    Gets a list of IUser objects not associated with a given group

    Declaration
    IEnumerable<IUser> GetAllNotInGroup(int groupId)
    Parameters
    Type Name Description
    System.Int32 groupId

    Id of group

    Returns
    Type Description
    IEnumerable<IUser>
    View Source

    GetByUsername(String, Boolean)

    Returns a user by username

    Declaration
    IUser GetByUsername(string username, bool includeSecurityData)
    Parameters
    Type Name Description
    System.String username
    System.Boolean includeSecurityData

    This is only used for a shim in order to upgrade to 7.7

    Returns
    Type Description
    IUser

    A non cached IUser instance

    View Source

    GetCountByQuery(IQuery<IUser>)

    Gets the count of items based on a complex query

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

    GetNextUsers(Int32, Int32)

    Declaration
    IEnumerable<IUser> GetNextUsers(int id, int count)
    Parameters
    Type Name Description
    System.Int32 id
    System.Int32 count
    Returns
    Type Description
    IEnumerable<IUser>
    View Source

    GetPagedResultsByQuery(IQuery<IUser>, Int64, Int32, out Int64, Expression<Func<IUser, Object>>, Direction, String[], String[], UserState[], IQuery<IUser>)

    Gets paged user results

    Declaration
    IEnumerable<IUser> GetPagedResultsByQuery(IQuery<IUser> query, long pageIndex, int pageSize, out long totalRecords, Expression<Func<IUser, object>> orderBy, Direction orderDirection = Direction.Ascending, string[] includeUserGroups = null, string[] excludeUserGroups = null, UserState[] userState = null, IQuery<IUser> filter = null)
    Parameters
    Type Name Description
    IQuery<IUser> query
    System.Int64 pageIndex
    System.Int32 pageSize
    System.Int64 totalRecords
    System.Linq.Expressions.Expression<Func<IUser, System.Object>> orderBy
    Direction orderDirection
    System.String[] includeUserGroups

    A filter to only include user that belong to these user groups

    System.String[] excludeUserGroups

    A filter to only include users that do not belong to these user groups

    UserState[] userState

    Optional parameter to filter by specified user state

    IQuery<IUser> filter
    Returns
    Type Description
    IEnumerable<IUser>
    View Source

    GetProfile(Int32)

    Declaration
    IProfile GetProfile(int id)
    Parameters
    Type Name Description
    System.Int32 id
    Returns
    Type Description
    IProfile
    View Source

    GetProfile(String)

    Declaration
    IProfile GetProfile(string username)
    Parameters
    Type Name Description
    System.String username
    Returns
    Type Description
    IProfile
    View Source

    GetUserStates()

    Declaration
    IDictionary<UserState, int> GetUserStates()
    Returns
    Type Description
    IDictionary<UserState, System.Int32>
    View Source

    ValidateLoginSession(Int32, Guid)

    Declaration
    bool ValidateLoginSession(int userId, Guid sessionId)
    Parameters
    Type Name Description
    System.Int32 userId
    Guid sessionId
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • ClearLoginSession(Guid)
      • ClearLoginSessions(Int32)
      • ClearLoginSessions(TimeSpan)
      • CreateLoginSession(Nullable<Int32>, String, Boolean)
      • ExistsByLogin(String)
      • ExistsByUserName(String)
      • Get(Nullable<Int32>, Boolean)
      • GetAllInGroup(Int32)
      • GetAllNotInGroup(Int32)
      • GetByUsername(String, Boolean)
      • GetCountByQuery(IQuery<IUser>)
      • GetNextUsers(Int32, Int32)
      • GetPagedResultsByQuery(IQuery<IUser>, Int64, Int32, out Int64, Expression<Func<IUser, Object>>, Direction, String[], String[], UserState[], IQuery<IUser>)
      • GetProfile(Int32)
      • GetProfile(String)
      • GetUserStates()
      • ValidateLoginSession(Int32, Guid)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX