public void UpdateUserProfileDetails(long userProfileId, UserProfileDetails userProfileDetails) { UserProfile userProfile = UserProfileDao.Find(userProfileId); userProfile.firstName = userProfileDetails.FirstName; userProfile.lastName = userProfileDetails.Lastname; userProfile.email = userProfileDetails.Email; userProfile.language = userProfileDetails.Language; userProfile.country = userProfileDetails.Country; UserProfileDao.Update(userProfile); }
public void UpdateUserProfileDetails(long userProfileId, UserProfileDetails userProfileDetails) { UserProfile userProfile = UserProfileDao.Find(userProfileId); userProfile.firstName = userProfileDetails.firstName; userProfile.lastName = userProfileDetails.lastName; userProfile.email = userProfileDetails.email; userProfile.language = userProfileDetails.language; userProfile.country = userProfileDetails.country; userProfile.role = userProfileDetails.role; userProfile.address = userProfileDetails.address; UserProfileDao.Update(userProfile); }
public void ChangePassword(long userProfileId, string oldClearPassword, string newClearPassword) { UserProfile userProfile = UserProfileDao.Find(userProfileId); String storedPassword = userProfile.enPassword; if (!PasswordEncrypter.IsClearPasswordCorrect(oldClearPassword, storedPassword)) { throw new IncorrectPasswordException(userProfile.loginName); } userProfile.enPassword = PasswordEncrypter.Crypt(newClearPassword); UserProfileDao.Update(userProfile); }