示例#1
0
        private async Task <bool> Update(
            ISiteUser user,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();

            if (string.IsNullOrEmpty(user.LoweredEmail))
            {
                user.LoweredEmail = user.Email.ToLowerInvariant();
            }

            return(await dbSiteUser.UpdateUser(
                       user.UserId,
                       user.DisplayName,
                       user.UserName,
                       user.Email,
                       user.Gender,
                       user.AccountApproved,
                       user.Trusted,
                       user.DisplayInMemberList,
                       user.WebSiteUrl,
                       user.Country,
                       user.State,
                       user.AvatarUrl,
                       user.Signature,
                       user.LoweredEmail,
                       user.Comment,
                       user.MustChangePwd,
                       user.FirstName,
                       user.LastName,
                       user.TimeZoneId,
                       user.NewEmail,
                       user.EmailChangeGuid,
                       user.PasswordResetGuid,
                       user.RolesChanged,
                       user.AuthorBio,
                       user.DateOfBirth,
                       user.EmailConfirmed,
                       user.PasswordHash,
                       user.SecurityStamp,
                       user.PhoneNumber,
                       user.PhoneNumberConfirmed,
                       user.TwoFactorEnabled,
                       user.LockoutEndDateUtc,
                       user.IsLockedOut,
                       cancellationToken
                       ));
        }
示例#2
0
        private bool Update(ISiteUser user)
        {
            if (string.IsNullOrEmpty(user.LoweredEmail))
            {
                user.LoweredEmail = user.Email.ToLowerInvariant();
            }

            return(dbSiteUser.UpdateUser(
                       user.UserId,
                       user.DisplayName,
                       user.UserName,
                       user.Email,
                       user.Password,
                       user.PasswordSalt,
                       user.Gender,
                       user.ProfileApproved,
                       user.ApprovedForLogin,
                       user.Trusted,
                       user.DisplayInMemberList,
                       user.WebSiteUrl,
                       user.Country,
                       user.State,
                       string.Empty, // legacy user.Occupation,
                       string.Empty, // legacy user.Interests,
                       string.Empty, // legacy user.MSN,
                       string.Empty, // legacy user.Yahoo,
                       string.Empty, // legacyuser.AIM,
                       string.Empty, // legacy user.ICQ,
                       user.AvatarUrl,
                       user.Signature,
                       user.Skin,
                       user.LoweredEmail,
                       user.PasswordQuestion,
                       user.PasswordAnswer,
                       user.Comment,
                       0,            // legacy timeOffsetHours
                       user.OpenIdUri,
                       string.Empty, // legacy user.WindowsLiveId,
                       user.MustChangePwd,
                       user.FirstName,
                       user.LastName,
                       user.TimeZoneId,
                       user.EditorPreference,
                       user.NewEmail,
                       user.EmailChangeGuid,
                       user.PasswordResetGuid,
                       user.RolesChanged,
                       user.AuthorBio,
                       user.DateOfBirth,
                       user.EmailConfirmed,
                       user.PasswordFormat,
                       user.PasswordHash,
                       user.SecurityStamp,
                       user.PhoneNumber,
                       user.PhoneNumberConfirmed,
                       user.TwoFactorEnabled,
                       user.LockoutEndDateUtc));


            //user.RegisterConfirmGuid,
            //user.TotalPosts,
            //user.TimeOffsetHours,
            //user.DateCreated,
            //user.UserGuid,
            //user.IsDeleted,
            //user.LastActivityDate,
            //user.LastLoginDate,
            //user.LastPasswordChangedDate,
            //user.LastLockoutDate,
            //user.FailedPasswordAttemptCount,
            //user.FailedPwdAttemptWindowStart,
            //user.FailedPwdAnswerAttemptCount,
            //user.FailedPwdAnswerWindowStart,
            //user.IsLockedOut,
            //user.MobilePIN,
            //user.SiteGuid,
            //user.TotalRevenue,
        }