Search Results for

    Show / Hide Table of Contents
    View Source

    Class MemberIdentityUser

    The identity user used for the member

    Inheritance
    object
    IdentityUser<string>
    IdentityUser
    UmbracoIdentityUser
    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class MemberIdentityUser : UmbracoIdentityUser, IRememberBeingDirty, ICanBeDirty

    Constructors

    View Source

    MemberIdentityUser()

    Initializes a new instance of the MemberIdentityUser class with default values.

    Declaration
    public MemberIdentityUser()
    View Source

    MemberIdentityUser(int)

    Initializes a new instance of the MemberIdentityUser class.

    Declaration
    public MemberIdentityUser(int userId)
    Parameters
    Type Name Description
    int userId

    Properties

    View Source

    Comments

    Gets or sets the member's comments

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

    CreatedDate

    Gets or sets the date and time when the member identity user was created.

    Declaration
    public DateTime CreatedDate { get; set; }
    Property Value
    Type Description
    DateTime
    Remarks

    No change tracking because the persisted value is readonly

    View Source

    IsExternalOnly

    Gets or sets a value indicating whether this member exists only as an external identity (backed by the lightweight umbracoExternalMember table, not the content system).

    Declaration
    public bool IsExternalOnly { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    No change tracking because this is a routing flag set at load time.

    View Source

    Key

    Gets or sets the unique identifier key for the member identity user.

    Declaration
    public Guid Key { get; set; }
    Property Value
    Type Description
    Guid
    Remarks

    No change tracking because the persisted value is readonly

    View Source

    LastLockoutDate

    Gets or sets the date and time when the member account was most recently locked out. This value is set when the IsLockedOut flag is updated.

    Declaration
    public DateTime? LastLockoutDate { get; set; }
    Property Value
    Type Description
    DateTime?
    Remarks

    No change tracking because the persisted value is only set with the IsLockedOut flag

    View Source

    MemberTypeAlias

    Gets or sets the alias of the member type

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

    ProfileData

    Gets or sets arbitrary profile data as a JSON string. Only used for external-only members. For content-based members, profile data lives in content properties and this value is null.

    Declaration
    public string? ProfileData { get; set; }
    Property Value
    Type Description
    string
    Remarks

    Dirty-tracked so that login-path routing (see MemberUserStore.UpdateExternalMemberAsync) can detect when an OnExternalLogin callback refreshes profile data and route to the full update path — ensuring the change is persisted and the member index is refreshed.

    Methods

    View Source

    CreateNew(string, string, string, bool, string?, Guid?)

    Creates a new MemberIdentityUser instance without assigning an identity.

    Declaration
    public static MemberIdentityUser CreateNew(string username, string email, string memberTypeAlias, bool isApproved, string? name = null, Guid? key = null)
    Parameters
    Type Name Description
    string username

    The username for the new member.

    string email

    The email address for the new member.

    string memberTypeAlias

    The alias of the member type.

    bool isApproved

    True if the member is approved; otherwise, false.

    string name

    The display name of the member (optional).

    Guid? key

    The unique identifier key for the member (optional).

    Returns
    Type Description
    MemberIdentityUser

    A MemberIdentityUser instance with no identity assigned (HasIdentity is false).

    View Source

    GetProfileData<T>(JsonSerializerOptions?)

    Deserialises the ProfileData JSON string into a typed object.

    Declaration
    public T? GetProfileData<T>(JsonSerializerOptions? options = null) where T : class
    Parameters
    Type Name Description
    JsonSerializerOptions options

    Optional JSON serializer options. If null, the default System.Text.Json.JsonSerializer options are used.

    Returns
    Type Description
    T

    The deserialised object, or default if ProfileData is null or empty.

    Type Parameters
    Name Description
    T

    The type to deserialise to.

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