Пример #1
0
        private string SetRandomPassword(string emailAddress)
        {
            string newPassword = PageUtil.GenPassword(6);

            string newHashedPswd = FormsAuthentication.HashPasswordForStoringInConfigFile(newPassword, "MD5");

            UserDa da = new UserDa();

            bool success = da.UpdateForgotPassword(emailAddress, newHashedPswd, "Forgot Password Page");

            if (success)
            {
                return(newPassword);
            }
            else
            {
                return("false");
            }
        }