EncryptPassword() public method

public EncryptPassword ( string text ) : string
text string
return string
コード例 #1
0
        public void ChangeUserPassword(long userId, String newPassword)
        {
            UserAccount userAccount = UserInformationService.GetUserAccountById(userId);

            userAccount.Password = AuthorizationService.EncryptPassword(newPassword);
            AccountAdministrationDao.SaveOrUpdateUser(userAccount);
        }
コード例 #2
0
        public void ChangePassword(long userAccountId, string oldPassword, string newPassword)
        {
            UserAccount userAccount = UserInformationService.GetUserAccountById(userAccountId);

            if (userAccount.Password != AuthorizationService.EncryptPassword(oldPassword))
            {
                //PASSWORD DOES NOT MATCH
            }
            else
            {
                userAccount.Password = AuthorizationService.EncryptPassword(newPassword);
                AccountAdministrationService.SaveOrUpdateUser(userAccount);
            }
        }