protected void buttonSave_Click(object sender, EventArgs e) { if (Page.IsValid) { SharedBasePage requestPage = Page as SharedBasePage; SiteConfig siteConfig = requestPage.SiteConfig; string userName = requestPage.User.Identity.Name; User user = SiteSecurity.GetUser(userName); // failed to retrieve the user if (user != null) { if (textPassword.Text.Length > 0 && textPassword.Text != passwordPlaceHolder) { user.Password = textPassword.Text; } user.EmailAddress = textEMail.Text; user.NotifyOnNewPost = checkboxNewPost.Checked; user.NotifyOnAllComment = checkboxAllComment.Checked; user.NotifyOnOwnComment = checkboxOwnComment.Checked; user.DisplayName = textDisplayName.Text; user.OpenIDUrl = textOpenIdIdentifier.Text; SiteSecurity.UpdateUser(user); } SetProfileContent(editControl.Text); requestPage.Redirect(Page.Request.Url.AbsoluteUri); } }