예제 #1
0
 private void DoChangePwd()
 {
     try
     {
         List <USER_USER> lstUser = new List <USER_USER>();
         USER_USER        usrObj  = new USER_USER();
         DbOperations.FindBy <USER_USER>(ref lstUser, usrObj, x => x.GUID == KsfSI.UserGuid);
         lstUser[0].PASSWORD             = KasifHelper.GetSha512HashedData(txtNewPwd.Value);
         lstUser[0].LAST_PWD_CHANGE_DATE = KasifHelper.GetCurrentDate();
         DbOperations.Update(lstUser[0]);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
 private bool CheckOldPasswordCorrectness(string oldPwd)
 {
     try
     {
         List <USER_USER> lstUser   = new List <USER_USER>();
         string[]         prmNames  = new string[] { "P_EMAIL", "P_PASSWORD" };
         object[]         prmValues = new object[] { KsfSI.Email, KasifHelper.GetSha512HashedData(oldPwd) };
         DbOperations.RunDbQuery <USER_USER>(ref lstUser, DbQueryName.GET_USER_BY_EMAIL, prmNames, prmValues);
         if (lstUser == null || lstUser.Count == 0)
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #3
0
 public OLogin(string userId, string pwd)
 {
     this.userId    = userId;
     this.hashedPwd = KasifHelper.GetSha512HashedData(pwd);
 }