Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IUser

    Defines the interface for a User

    Namespace: Umbraco.Cms.Core.Models.Membership
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IUser : IMembershipUser, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
    Remarks

    Will be left internal until a proper Membership implementation is part of the roadmap

    Properties

    View Source

    AllowedSections

    Gets the collection of section aliases that this user has access to.

    Declaration
    IEnumerable<string> AllowedSections { get; }
    Property Value
    Type Description
    IEnumerable<string>
    View Source

    Avatar

    Will hold the media file system relative path of the users custom avatar if they uploaded one

    Declaration
    string? Avatar { get; set; }
    Property Value
    Type Description
    string
    View Source

    Groups

    Gets the groups that user is part of

    Declaration
    IEnumerable<IReadOnlyUserGroup> Groups { get; }
    Property Value
    Type Description
    IEnumerable<IReadOnlyUserGroup>
    View Source

    InvitedDate

    Gets or sets the date and time when the user was invited.

    Declaration
    DateTime? InvitedDate { get; set; }
    Property Value
    Type Description
    DateTime?
    View Source

    Kind

    The type of user.

    Declaration
    UserKind Kind { get; set; }
    Property Value
    Type Description
    UserKind
    View Source

    Language

    Gets or sets the preferred language for the user's backoffice UI.

    Declaration
    string? Language { get; set; }
    Property Value
    Type Description
    string
    View Source

    Name

    Gets or sets the display name of the user.

    Declaration
    string? Name { get; set; }
    Property Value
    Type Description
    string
    View Source

    ProfileData

    Exposes the basic profile data

    Declaration
    IProfile ProfileData { get; }
    Property Value
    Type Description
    IProfile
    View Source

    SessionTimeout

    Gets or sets the session timeout in minutes.

    Declaration
    int SessionTimeout { get; set; }
    Property Value
    Type Description
    int
    View Source

    StartContentIds

    Gets or sets the starting content node identifiers for this user.

    Declaration
    int[]? StartContentIds { get; set; }
    Property Value
    Type Description
    int[]
    View Source

    StartMediaIds

    Gets or sets the starting media node identifiers for this user.

    Declaration
    int[]? StartMediaIds { get; set; }
    Property Value
    Type Description
    int[]
    View Source

    UserState

    Gets the current state of the user.

    Declaration
    UserState UserState { get; }
    Property Value
    Type Description
    UserState

    Methods

    View Source

    AddGroup(IReadOnlyUserGroup)

    Adds the user to the specified group.

    Declaration
    void AddGroup(IReadOnlyUserGroup group)
    Parameters
    Type Name Description
    IReadOnlyUserGroup group

    The group to add the user to.

    View Source

    ClearGroups()

    Removes the user from all groups.

    Declaration
    void ClearGroups()
    View Source

    RemoveGroup(string)

    Removes the user from the specified group.

    Declaration
    void RemoveGroup(string group)
    Parameters
    Type Name Description
    string group

    The alias of the group to remove the user from.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX