Beispiel #1
0
        public ActionResult AutoResetPassword(NewUser newUser)
        {
            UserData      userData      = new UserData();
            UserLogonData userLogonData = new UserLogonData();
            Encrypt       encrypt       = new Encrypt();

            newUser.Password = encrypt.CreateRandomPassword(6);
            string encryptedpass = encrypt.GetSHA1HashData(newUser.Password);

            userLogonData.UpdateResetPasswordEmailScheduler(newUser);
            if (userLogonData.ResetPassword(newUser.UserId, encrypt.GetSHA1HashData(encryptedpass + newUser.UserId)) == true)
            {
                return(Content("PWD_RESET_S"));
            }
            else
            {
                return(Content("PWD_RESET_F"));
            }
        }