IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin> Class¶
Represents a user in the identity system
- Namespace
Microsoft.AspNetCore.Identity.EntityFrameworkCore- Assemblies
- Microsoft.AspNetCore.Identity.EntityFrameworkCore
Syntax¶
public class IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>
where TKey : IEquatable<TKey>
-
class
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>¶
Constructors¶
-
IdentityUser()¶ Initializes a new instance of
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser`1.public IdentityUser()
-
IdentityUser(System.String) Initializes a new instance of
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser`1.Arguments: userName (System.String) – The user name. public IdentityUser(string userName)
-
Properties¶
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.AccessFailedCount¶ Gets or sets the number of failed login attempts for the current user.
Return type: System.Int32 public virtual int AccessFailedCount { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.Claims¶ Navigation property for the claims this user possesses.
Return type: System.Collections.Generic.ICollection<TUserClaim> public virtual ICollection<TUserClaim> Claims { get; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.ConcurrencyStamp¶ A random value that must change whenever a user is persisted to the store
Return type: System.String public virtual string ConcurrencyStamp { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.Email¶ Gets or sets the email address for this user.
Return type: System.String public virtual string Email { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.EmailConfirmed¶ Gets or sets a flag indicating if a user has confirmed their email address.
Return type: System.Boolean Returns: True if the email address has been confirmed, otherwise false. public virtual bool EmailConfirmed { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.Id¶ Gets or sets the primary key for this user.
Return type: TKey public virtual TKey Id { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.LockoutEnabled¶ Gets or sets a flag indicating if the user could be locked out.
Return type: System.Boolean Returns: True if the user could be locked out, otherwise false. public virtual bool LockoutEnabled { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.LockoutEnd¶ Gets or sets the date and time, in UTC, when any user lockout ends.
Return type: System.Nullable<System.DateTimeOffset> public virtual DateTimeOffset? LockoutEnd { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.Logins¶ Navigation property for this users login accounts.
Return type: System.Collections.Generic.ICollection<TUserLogin> public virtual ICollection<TUserLogin> Logins { get; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.NormalizedEmail¶ Gets or sets the normalized email address for this user.
Return type: System.String public virtual string NormalizedEmail { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.NormalizedUserName¶ Gets or sets the normalized user name for this user.
Return type: System.String public virtual string NormalizedUserName { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.PasswordHash¶ Gets or sets a salted and hashed representation of the password for this user.
Return type: System.String public virtual string PasswordHash { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.PhoneNumber¶ Gets or sets a telephone number for the user.
Return type: System.String public virtual string PhoneNumber { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.PhoneNumberConfirmed¶ Gets or sets a flag indicating if a user has confirmed their telephone address.
Return type: System.Boolean Returns: True if the telephone number has been confirmed, otherwise false. public virtual bool PhoneNumberConfirmed { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.Roles¶ Navigation property for the roles this user belongs to.
Return type: System.Collections.Generic.ICollection<TUserRole> public virtual ICollection<TUserRole> Roles { get; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.SecurityStamp¶ A random value that must change whenever a users credentials change (password changed, login removed)
Return type: System.String public virtual string SecurityStamp { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.TwoFactorEnabled¶ Gets or sets a flag indicating if two factor authentication is enabled for this user.
Return type: System.Boolean Returns: True if 2fa is enabled, otherwise false. public virtual bool TwoFactorEnabled { get; set; }
-
Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>.UserName¶ Gets or sets the user name for this user.
Return type: System.String public virtual string UserName { get; set; }
-