public void UpdateEmail(string newEmail) { EmailAddress = newEmail; TryCreateUser(EmailAddress, Password, Username, ProfilePicture); OnUserInformationChanged?.Invoke(this); }
public void UpdateProfilePicture(string pic) { var bytes = File.ReadAllBytes(pic); var loc = UserFile.UserFolder + Username + "/userImage.img"; File.WriteAllBytes(loc, bytes); TryCreateUser(EmailAddress, Password, Username); OnUserInformationChanged?.Invoke(this); }
public void UpdateUsername(string newName) { FileSystem.TryChangeDirectoryName( UserFile.UserFolder + CurrentUser.Username, UserFile.UserFolder + newName); Username = newName; TryCreateUser(EmailAddress, Password, Username, ProfilePicture); OnUserInformationChanged?.Invoke(this); }
public void UpdatePassword(string confirmedPassword, string newPass) { if (confirmedPassword != Password) { return; } Password = newPass; TryCreateUser(EmailAddress, Password, Username, ProfilePicture); OnUserInformationChanged?.Invoke(this); }