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<Guid, IUser>, IReadRepository<Guid, IUser>, IWriteRepository<IUser>, IQueryRepository<IUser>, IRepository

    Methods

    View Source

    AddClientId(int, string)

    Declaration
    void AddClientId(int id, string clientId)
    Parameters
    Type Name Description
    int id
    string clientId
    View Source

    ClearLoginSession(Guid)

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

    ClearLoginSessions(int)

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

    ClearLoginSessions(TimeSpan)

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

    CreateLoginSession(int?, string, bool)

    Declaration
    Guid CreateLoginSession(int? userId, string requestingIpAddress, bool cleanStaleSessions = true)
    Parameters
    Type Name Description
    int? userId
    string requestingIpAddress
    bool 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
    string login
    Returns
    Type Description
    bool
    View Source

    ExistsByUserName(string)

    Checks if a user with the username exists

    Declaration
    bool ExistsByUserName(string username)
    Parameters
    Type Name Description
    string username
    Returns
    Type Description
    bool
    View Source

    Get(int)

    Returns a user by id

    Declaration
    IUser? Get(int id)
    Parameters
    Type Name Description
    int id
    Returns
    Type Description
    IUser

    A cached IUser instance

    View Source

    Get(int?, bool)

    Returns a user by id

    Declaration
    IUser? Get(int? id, bool includeSecurityData)
    Parameters
    Type Name Description
    int? id
    bool 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

    GetAllClientIds()

    Declaration
    IEnumerable<string> GetAllClientIds()
    Returns
    Type Description
    IEnumerable<string>
    View Source

    GetAllInGroup(int)

    Gets a list of IUser objects associated with a given group

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

    Id of group

    Returns
    Type Description
    IEnumerable<IUser>
    View Source

    GetAllNotInGroup(int)

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

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

    Id of group

    Returns
    Type Description
    IEnumerable<IUser>
    View Source

    GetByClientId(string)

    Declaration
    IUser? GetByClientId(string clientId)
    Parameters
    Type Name Description
    string clientId
    Returns
    Type Description
    IUser
    View Source

    GetByUsername(string, bool)

    Returns a user by username

    Declaration
    IUser? GetByUsername(string username, bool includeSecurityData)
    Parameters
    Type Name Description
    string username
    bool 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

    GetClientIds(int)

    Declaration
    IEnumerable<string> GetClientIds(int id)
    Parameters
    Type Name Description
    int id
    Returns
    Type Description
    IEnumerable<string>
    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
    int
    View Source

    GetForUpgrade(int)

    Gets a user for upgrade purposes, this will only return a result if the current runtime state is upgrade.

    Declaration
    IUser? GetForUpgrade(int id)
    Parameters
    Type Name Description
    int id

    The id to find the user by.

    Returns
    Type Description
    IUser

    An uncached IUser instance.

    Remarks

    This only resolves the minimum amount of fields required to authorize for an upgrade. We need this to be able to add new columns to the user table.

    View Source

    GetForUpgradeByEmail(string)

    Gets a user by email for upgrade purposes, this will only return a result if the current runtime state is upgrade.

    Declaration
    IUser? GetForUpgradeByEmail(string email)
    Parameters
    Type Name Description
    string email

    The email to find the user by.

    Returns
    Type Description
    IUser

    An uncached IUser instance.

    Remarks

    This only resolves the minimum amount of fields required to authorize for an upgrade. We need this to be able to add new columns to the user table.

    View Source

    GetForUpgradeByUsername(string)

    Gets a user by username for upgrade purposes, this will only return a result if the current runtime state is upgrade.

    Declaration
    IUser? GetForUpgradeByUsername(string username)
    Parameters
    Type Name Description
    string username

    The username to find the user by.

    Returns
    Type Description
    IUser

    An uncached IUser instance.

    Remarks

    This only resolves the minimum amount of fields required to authorize for an upgrade. We need this to be able to add new columns to the user table.

    View Source

    GetPagedResultsByQuery(IQuery<IUser>?, long, int, out long, 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
    long pageIndex
    int pageSize
    long totalRecords
    Expression<Func<IUser, object>> orderBy
    Direction orderDirection
    string[] includeUserGroups

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

    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(int)

    Declaration
    IProfile? GetProfile(int id)
    Parameters
    Type Name Description
    int id
    Returns
    Type Description
    IProfile
    View Source

    GetProfile(string)

    Declaration
    IProfile? GetProfile(string username)
    Parameters
    Type Name Description
    string username
    Returns
    Type Description
    IProfile
    View Source

    GetUserStates()

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

    InvalidateSessionsForRemovedProviders(IEnumerable<string>)

    Invalidates sessions for users that aren't associated with the current collection of providers.

    Declaration
    void InvalidateSessionsForRemovedProviders(IEnumerable<string> currentLoginProviders)
    Parameters
    Type Name Description
    IEnumerable<string> currentLoginProviders

    The names of the currently configured providers.

    View Source

    RemoveClientId(int, string)

    Declaration
    bool RemoveClientId(int id, string clientId)
    Parameters
    Type Name Description
    int id
    string clientId
    Returns
    Type Description
    bool
    View Source

    ValidateLoginSession(int, Guid)

    Declaration
    bool ValidateLoginSession(int userId, Guid sessionId)
    Parameters
    Type Name Description
    int userId
    Guid sessionId
    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX