private void SettingsClicked() { // Only update a logged on user if all validators are valid if (Page.IsValid) { _userID = LoggedOnUserID; if (_userID > 0) { // Update user details string avatar = UploadAvatar(); if (avatar != string.Empty) { DeletePreviousAvatar(avatar); } // Populate user object with information that will be changed User user = new User(); user.UserID = _userID; user.Alias = _aliasTextBox.Text; user.Email = _emailTextBox.Text; // CHANGED by Arthur Zaczek user.Password = "******"; //_passwordTextBox.Text; user.Avatar = avatar; // Update the user UserDB.UpdateUser(user); // Redirect if return URL specified RedirectReturnURL(); } } }
private void JoinClicked() { // Only add new user if all validators are valid if (Page.IsValid) { // Create new user User user = new User(); user.Alias = _aliasTextBox.Text; user.Email = _emailTextBox.Text; // user.Password = _passwordTextBox.Text; user.WebID = WebID; _userID = UserDB.AddUser(user); if (_userID > 0) { // Avatar considerations string avatar = UploadAvatar(); if (avatar != string.Empty) { user.Avatar = avatar; UserDB.UpdateUser(user); } // Log user on using forums authentication and redirect if return URL specified FormsAuthentication.SetAuthCookie(_userID.ToString(), _rememberMeCheckBox.Checked); RedirectReturnURL(); } } }