protected void btnUpdateUser_Click(object sender, EventArgs e) { if (!Page.IsValid) { //TODO return; } var userId = GetUserId(); accountUtil.SetEmail(userId, userForm.GetEmailTextBox().Text.Trim()); if (userForm.GetIsAdminCheckBox().Checked) { accountUtil.AddToAdminRole(userId); } else { accountUtil.RemoveFromAdminRole(userId); } if (userForm.GetIsSuperuserCheckBox().Checked) { accountUtil.AddToSuperuserRole(userId); } else { accountUtil.RemoveFromSuperuserRole(userId); } GoToUsersPage(); }