/*-----------------------------------------------------------------------------CHANGE PASSWORD-----------------------------------------*/ public void updatePassword(UserInfo userInfo) { try { DataValidations objDataValidation = new DataValidations(); bool boolValue = objDataValidation.validatePassword(userInfo.pwdchange_newpwd); if (boolValue != false) { userInfo.pwdchange_upddate = DateTime.Now; objUserInfoDAL.updatePassword(userInfo); } } catch (Exception ex) { CubitExceptionUtility.CubitExceptionLog(ex.Message + "BAL: Error while updating password" + ex.StackTrace + " " + ex.InnerException, this.GetType().BaseType.Name.ToString(), DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString()); } }
/*----------------------------------------------------------------------------FORGOT PASSWORD---------------------------------------*/ public void generateLink(UserPersonalInfo userPerInfo) { try { DataValidations objDataValidation = new DataValidations(); bool boolValue = objDataValidation.validateEmail(userPerInfo.user_email); if (boolValue != false) { userPerInfo.pwdchange_redate = DateTime.Now; userPerInfo.pwdchange_guid = objGuid.Invoke(); objUserInfoDAL.saveLink(userPerInfo); forgotPassword(userPerInfo); } } catch (Exception ex) { CubitExceptionUtility.CubitExceptionLog(ex.Message + "BAL: Error while running Guid" + ex.StackTrace + " " + ex.InnerException, this.GetType().BaseType.Name.ToString(), DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString()); } }
public bool login(string email, string password) { bool boolvalue = false, valiBool = false; try { DataValidations objDataValidations = new DataValidations(); valiBool = objDataValidations.checkValidateEmail(email); if (valiBool == false) { return(false); // return http response number : email is not valid } if (valiBool != false) { boolvalue = objUserInfoDAL.login(email, password); } } catch (Exception ex) { CubitExceptionUtility.CubitExceptionLog(ex.Message + "BAL: Error while validating email" + ex.StackTrace + " " + ex.InnerException, this.GetType().BaseType.Name.ToString(), DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString()); } return(boolvalue); }