Exemple #1
0
        public static void LogPasswordDelete(PasswordModel password, IDbContext dbContext)
        {
            PasswordChange passwordChange = new PasswordChange()
            {
                PasswordId     = password.Id,
                UserId         = password.IdUser,
                OldData        = PasswordToString(password),
                ChangeDateTime = LoginHelper.TruncateDateTime(DateTime.Now)
            };

            dbContext.LogPasswordChange(passwordChange);
        }
Exemple #2
0
        public static void LogPasswordEdit(PasswordModel old, PasswordModel changed, IDbContext dbContext)
        {
            PasswordChange passwordChange = new PasswordChange()
            {
                PasswordId     = changed.Id,
                UserId         = changed.IdUser,
                OldData        = PasswordToString(old),
                NewData        = PasswordToString(changed),
                ChangeDateTime = LoginHelper.TruncateDateTime(DateTime.Now)
            };

            dbContext.LogPasswordChange(passwordChange);
        }