diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs index f8dba28..793229d 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs @@ -337,7 +337,7 @@ namespace EasyBL.WEBAPP.SYS var bSend = new MailService(sOrgID, true).MailFactory(oEmail, out sError); srm = new SuccessResponseMessage(null, null); - srm.DATA.Add(BLWording.REL, Mailto.MemberID); + srm.DATA.Add(BLWording.REL, Mailto.Email); } while (false); return srm; @@ -457,6 +457,7 @@ namespace EasyBL.WEBAPP.SYS { do { + Console.WriteLine(Email); var sUser = db.Queryable().Single(x => x.Email == Email); sUser.Password = SecurityUtil.Encrypt(Password); //新密碼加密 var iRel = db.Updateable(sUser).ExecuteCommand(); //將新密碼更新至資料庫 diff --git a/EuroTran/WebApp/Controllers/SignupController.cs b/EuroTran/WebApp/Controllers/SignupController.cs index d7d5e18..57d25f7 100644 --- a/EuroTran/WebApp/Controllers/SignupController.cs +++ b/EuroTran/WebApp/Controllers/SignupController.cs @@ -67,7 +67,17 @@ namespace WebApp.Controllers public HttpResponseMessage ResetPage(string Email) { - return new SignupService().ResetPage(Email); + var result = new SignupService().ResetPage(Email); + var Server = Common.ConfigGetValue("", "ida:WebsiteUri"); + + if (result.ReasonPhrase == "OK") + { + result = Request.CreateResponse(HttpStatusCode.Moved); + result.Headers.Location = new Uri(Server + "/user/forgot"); //在API Header加入要導向的Location Url + } + + return result; + //return new SignupService().ResetPage(Email); }