public TMUser()
{
ID = Guid.NewGuid();
UserTags = new List<UserTag>();
SecretData = new UserSecretData
{
PasswordResetToken = null, // default to Null
EnableUserToken = Guid.Empty
};
Sessions = new List<UserSession>();
AuthTokens = new List<AuthToken>();
UserActivities = new List<UserActivity>();
AccountStatus = TMConfig.Current.isNull()
? new UserAccountStatus()
: new UserAccountStatus
{
ExpirationDate = default(DateTime), //TMConfig.Current.currentExpirationDate(),
PasswordExpired = false,
AccountNeverExpires = TMConfig.Current.TMSecurity.NewAccounts_DontExpire,
UserEnabled = TMConfig.Current.TMSecurity.NewAccounts_Enabled //TMConfig.Current.newAccountsEnabled()
};
Stats = new UserStats
{
CreationDate = DateTime.Now
};
}