Search Results for

    Show / Hide Table of Contents
    View Source

    Class User

    Represents a backoffice user

    Inheritance
    object
    BeingDirtyBase
    EntityBase
    Namespace: Umbraco.Cms.Core.Models.Membership
    Assembly: Umbraco.Core.dll
    Syntax
    [Serializable]
    [DataContract(IsReference = true)]
    public class User : EntityBase, IUser, IMembershipUser, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty, IProfile

    Constructors

    View Source

    User(GlobalSettings)

    Constructor for creating a new/empty user

    Declaration
    public User(GlobalSettings globalSettings)
    Parameters
    Type Name Description
    GlobalSettings globalSettings
    View Source

    User(GlobalSettings, int, string?, string, string?, string?, string?, IEnumerable<IReadOnlyUserGroup>, int[], int[])

    Constructor for creating a new User instance for an existing user

    Declaration
    public User(GlobalSettings globalSettings, int id, string? name, string email, string? username, string? rawPasswordValue, string? passwordConfig, IEnumerable<IReadOnlyUserGroup> userGroups, int[] startContentIds, int[] startMediaIds)
    Parameters
    Type Name Description
    GlobalSettings globalSettings
    int id
    string name
    string email
    string username
    string rawPasswordValue
    string passwordConfig
    IEnumerable<IReadOnlyUserGroup> userGroups
    int[] startContentIds
    int[] startMediaIds
    View Source

    User(GlobalSettings, string?, string, string, string)

    Constructor for creating a new/empty user

    Declaration
    public User(GlobalSettings globalSettings, string? name, string email, string username, string rawPasswordValue)
    Parameters
    Type Name Description
    GlobalSettings globalSettings
    string name
    string email
    string username
    string rawPasswordValue

    Properties

    View Source

    AllowedSections

    Declaration
    public 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
    [DataMember]
    public string? Avatar { get; set; }
    Property Value
    Type Description
    string
    View Source

    Comments

    Declaration
    [IgnoreDataMember]
    public string? Comments { get; set; }
    Property Value
    Type Description
    string
    View Source

    Email

    Declaration
    [DataMember]
    public string Email { get; set; }
    Property Value
    Type Description
    string
    View Source

    EmailConfirmedDate

    Declaration
    [DataMember]
    public DateTime? EmailConfirmedDate { get; set; }
    Property Value
    Type Description
    DateTime?
    View Source

    FailedPasswordAttempts

    Gets or sets the number of failed password attempts. This is the number of times the password was entered incorrectly upon login.

    Declaration
    [IgnoreDataMember]
    public int FailedPasswordAttempts { get; set; }
    Property Value
    Type Description
    int
    Remarks

    Alias: umbracoMemberFailedPasswordAttempts Part of the standard properties collection.

    View Source

    Groups

    Gets the groups that user is part of

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

    InvitedDate

    Declaration
    [DataMember]
    public DateTime? InvitedDate { get; set; }
    Property Value
    Type Description
    DateTime?
    View Source

    IsApproved

    Declaration
    [DataMember]
    public bool IsApproved { get; set; }
    Property Value
    Type Description
    bool
    View Source

    IsLockedOut

    Declaration
    [IgnoreDataMember]
    public bool IsLockedOut { get; set; }
    Property Value
    Type Description
    bool
    View Source

    Kind

    The type of user.

    Declaration
    [DataMember]
    public UserKind Kind { get; set; }
    Property Value
    Type Description
    UserKind
    View Source

    Language

    Declaration
    [DataMember]
    public string? Language { get; set; }
    Property Value
    Type Description
    string
    View Source

    LastLockoutDate

    Declaration
    [IgnoreDataMember]
    public DateTime? LastLockoutDate { get; set; }
    Property Value
    Type Description
    DateTime?
    View Source

    LastLoginDate

    Declaration
    [IgnoreDataMember]
    public DateTime? LastLoginDate { get; set; }
    Property Value
    Type Description
    DateTime?
    View Source

    LastPasswordChangeDate

    Declaration
    [IgnoreDataMember]
    public DateTime? LastPasswordChangeDate { get; set; }
    Property Value
    Type Description
    DateTime?
    View Source

    Name

    Declaration
    [DataMember]
    public string? Name { get; set; }
    Property Value
    Type Description
    string
    View Source

    PasswordConfiguration

    The user's specific password config (i.e. algorithm type, etc...)

    Declaration
    [IgnoreDataMember]
    public string? PasswordConfiguration { get; set; }
    Property Value
    Type Description
    string
    View Source

    ProfileData

    Exposes the basic profile data

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

    RawPasswordValue

    Gets or sets the raw password value

    Declaration
    [IgnoreDataMember]
    public string? RawPasswordValue { get; set; }
    Property Value
    Type Description
    string
    View Source

    SecurityStamp

    The security stamp used by ASP.Net identity

    Declaration
    [IgnoreDataMember]
    public string? SecurityStamp { get; set; }
    Property Value
    Type Description
    string
    View Source

    SessionTimeout

    Gets or sets the session timeout.

    Declaration
    [DataMember]
    public int SessionTimeout { get; set; }
    Property Value
    Type Description
    int

    The session timeout.

    View Source

    StartContentIds

    Gets or sets the start content id.

    Declaration
    [DataMember]
    public int[]? StartContentIds { get; set; }
    Property Value
    Type Description
    int[]

    The start content id.

    View Source

    StartMediaIds

    Gets or sets the start media id.

    Declaration
    [DataMember]
    public int[]? StartMediaIds { get; set; }
    Property Value
    Type Description
    int[]

    The start media id.

    View Source

    UserState

    Declaration
    public UserState UserState { get; }
    Property Value
    Type Description
    UserState
    View Source

    Username

    Declaration
    [DataMember]
    public string Username { get; set; }
    Property Value
    Type Description
    string

    Methods

    View Source

    AddGroup(IReadOnlyUserGroup)

    Declaration
    public void AddGroup(IReadOnlyUserGroup group)
    Parameters
    Type Name Description
    IReadOnlyUserGroup group
    View Source

    ClearGroups()

    Declaration
    public void ClearGroups()
    View Source

    PerformDeepClone(object)

    Used by inheritors to modify the DeepCloning logic

    Declaration
    protected override void PerformDeepClone(object clone)
    Parameters
    Type Name Description
    object clone
    View Source

    RemoveGroup(string)

    Declaration
    public void RemoveGroup(string group)
    Parameters
    Type Name Description
    string group
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX