From 702d927f54215a8374250180e22fd291023fe5c2 Mon Sep 17 00:00:00 2001 From: jity7777 Date: Fri, 19 Jan 2024 07:56:15 +0000 Subject: [PATCH] =?UTF-8?q?<=EB=8B=A8=EC=88=9C=EC=9E=91=EC=97=85>=201.=20?= =?UTF-8?q?=EA=B0=9C=EB=B0=9C=EC=9A=A9=EC=9C=BC=EB=A1=9C=20=EB=8B=A8?= =?UTF-8?q?=EC=88=9C=EB=B3=80=EA=B2=BD=202.=20(=EC=A3=BC=EC=9A=94)?= =?UTF-8?q?=EC=9E=91=EC=97=85=EB=82=B4=EC=9A=A9=20=20=20-=20=EB=88=84?= =?UTF-8?q?=EB=9D=BD=EB=B3=B8=20=EC=BB=A4=EB=B0=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Base/Controller/BasePartialController.cs | 8 ++++++-- Base/Controller/FOCommon.cs | 5 +++++ Dao/MyBatis/Maps/User.xml | 2 +- FO/Views/Account/IndexBase.cshtml | 3 +++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Base/Controller/BasePartialController.cs b/Base/Controller/BasePartialController.cs index 1791169..d487cd8 100644 --- a/Base/Controller/BasePartialController.cs +++ b/Base/Controller/BasePartialController.cs @@ -1897,7 +1897,11 @@ namespace NP.Base //} //else //{ - if (u.userpass.Equals(NP.Base.Lib.KISA_SHA256.SHA256Hash(upw.Trim())) || upw.Trim().Equals("rhksflwkfhrmdls999")) + if (u.status == 9) + { + u.intv1 = 2; + } + else if(u.userpass.Equals(NP.Base.Lib.KISA_SHA256.SHA256Hash(upw.Trim())) || upw.Trim().Equals("rhksflwkfhrmdls999")) { Random r = new Random(); var loginkey = r.Next(10000000, 99999999); @@ -1916,7 +1920,7 @@ namespace NP.Base AuthCookie(true); u.intv1 = 0; - } + } else { u.intv1 = 1; diff --git a/Base/Controller/FOCommon.cs b/Base/Controller/FOCommon.cs index 5cc8d2e..ddc7200 100644 --- a/Base/Controller/FOCommon.cs +++ b/Base/Controller/FOCommon.cs @@ -127,6 +127,11 @@ namespace NP.Base.Controllers return JsonBack(new JsonRtn() { code = 1000, msg = "-4", obj = u.userno }); } + if (u.intv1 == 2) + { + // 비활성 상태(비번 5회 이상) + return JsonBack(new JsonRtn() { code = 1000, msg = "-5", obj = u.userno }); + } else { diff --git a/Dao/MyBatis/Maps/User.xml b/Dao/MyBatis/Maps/User.xml index 42bdf60..c6f6d9e 100644 --- a/Dao/MyBatis/Maps/User.xml +++ b/Dao/MyBatis/Maps/User.xml @@ -651,7 +651,7 @@ - where (userpass=#userpass# or #userpass# is null) and a.usertype=1 and a.status<9 + where (userpass=#userpass# or #userpass# is null) and a.usertype=1 and a.userid=#userid# diff --git a/FO/Views/Account/IndexBase.cshtml b/FO/Views/Account/IndexBase.cshtml index 037f2bf..64d7996 100644 --- a/FO/Views/Account/IndexBase.cshtml +++ b/FO/Views/Account/IndexBase.cshtml @@ -128,6 +128,9 @@ msg("입력하신 아이디/비밀번호와 일치하는 계정이 없습니다. 다시 확인해주세요.
5회이상 비밀번호 오류 시 로그인이 제한됩니다."); } } + else if (capResult.msg == "-5") { // 비활성상태 + msg("비밀번호 5회 이상 오류로 로그인이 제한되었습니다.\n교육원으로 문의해주세요."); + } else { $("#mform").attr("action", "/"); if ('@(Model.ru??"")' != "") {