Class User
- Namespace
- KadicAuth.Domain.Entities
- Assembly
- KadicAuth.Domain.dll
- Inheritance
-
object
User
Constructors
User(Guid, Guid, string, string, string, string?, string?)
public User(Guid id, Guid tenantId, string email, string username, string passwordHash, string? firstName = null, string? lastName = null)
Parameters
id Guid
tenantId Guid
email string
username string
passwordHash string
firstName string
lastName string
Properties
AccessFailedCount
public int AccessFailedCount { get; }
Property Value
- int
CreatedAt
public DateTime CreatedAt { get; }
Property Value
- DateTime
Email
public string Email { get; }
Property Value
- string
Id
Property Value
- Guid
IsActive
public bool IsActive { get; }
Property Value
- bool
LastLoginAt
public DateTime? LastLoginAt { get; }
Property Value
- DateTime?
LastName
public string LastName { get; }
Property Value
- string
LockoutEnd
public DateTime? LockoutEnd { get; }
Property Value
- DateTime?
MustChangePassword
public bool MustChangePassword { get; }
Property Value
- bool
Name
public string Name { get; }
Property Value
- string
PasswordHash
public string PasswordHash { get; }
Property Value
- string
RoleAssignments
public ICollection<UserRoleAssignment> RoleAssignments { get; set; }
Property Value
- ICollection<UserRoleAssignment>
Sessions
public ICollection<UserSession> Sessions { get; set; }
Property Value
- ICollection<UserSession>
TenantId
public Guid TenantId { get; }
Property Value
- Guid
UpdatedAt
public DateTime? UpdatedAt { get; }
Property Value
- DateTime?
UserTenantBranches
public ICollection<UserBranch> UserTenantBranches { get; set; }
Property Value
- ICollection<UserBranch>
Username
public string Username { get; }
Property Value
- string
Methods
Activate()
Deactivate()
IncrementAccessFailedCount()
public void IncrementAccessFailedCount()
IsLockedOut()
public bool IsLockedOut()
Returns
- bool
ResetAccessFailedCount()
public void ResetAccessFailedCount()
SetMustChangePassword(bool)
public void SetMustChangePassword(bool mustChange)
Parameters
mustChange bool
UpdateLastLogin()
public void UpdateLastLogin()
UpdatePassword(string)
public void UpdatePassword(string newPasswordHash)
Parameters
newPasswordHash string
UpdateProfile(string?, string?, string, string)
public void UpdateProfile(string? firstName, string? lastName, string email, string username)
Parameters
firstName string
lastName string
email string
username string