Browse Source

[WHAT] 登入、忘記密碼判斷會員狀態並傳回error [WHY] 開發 ShowEasy API

Dev
Janie 2 years ago
parent
commit
3462047341
  1. 12
      EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs
  2. 2
      EuroTran/EasyBL.WEBAPP/ShowEasy/SystemService.cs

12
EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs

@ -353,10 +353,16 @@ namespace EasyBL.WEBAPP.SYS
var Mailto = db.Queryable<SETB_CMS_Member>().First(x => x.Email == Email);
if (Mailto.Status != "1")
if (Mailto == null)
{
sError = @"帳號或密碼不正確"; //帳號或密碼不正確
break;
}
if (Mailto.Status != "1")
{
sError = @"該帳號未認證或已註銷"; //該帳號無效
sError = Mailto.Status; //該帳號無效
break;
}
@ -381,7 +387,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.Email);
srm.DATA.Add(BLWording.REL, Mailto);
} while (false);
}

2
EuroTran/EasyBL.WEBAPP/ShowEasy/SystemService.cs

@ -149,7 +149,7 @@ namespace EasyBL.WEBAPP.SYS
if (oUser.Status != @"1")
{
errorStaus = (int)StatusCodeEnum.Unauthorized;
sError = @"該帳號未啓用"; //該帳號無效
sError = oUser.Status; //該帳號無效
break;
}

Loading…
Cancel
Save