예제 #1
0
 /// <summary>
 /// 保存需要重置用户
 /// </summary>
 /// <returns></returns>
 public static bool Save(ResetUser user)
 {
     if (user.Id == string.Empty)
     {
         user.Id = null;
     }
     user.ResetTime = DateTime.Now;
     return(DbContextManager.Create <ResetUser>().Save(user));
 }
예제 #2
0
        /// <summary>
        /// 忘记密码调用
        /// </summary>
        /// <param name="user"></param>
        public static bool ForgotPassword(ResetUser user)
        {
            var ret = DbContextManager.Create <User>().ForgotPassword(user);

            if (ret)
            {
                CacheCleanUtility.ClearCache(cacheKey: RetrieveUsersDataKey);
            }
            return(ret);
        }
예제 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="user"></param>
 /// <returns></returns>
 public virtual bool ForgotPassword(ResetUser user) => ResetUserHelper.Save(user);
예제 #4
0
 /// <summary>
 /// 保存需要重置用户
 /// </summary>
 /// <returns></returns>
 public static bool Save(ResetUser user)
 {
     user.ResetTime = DateTime.Now;
     return(DbContextManager.Create <ResetUser>()?.Save(user) ?? false);
 }
예제 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public virtual bool Save(ResetUser user)
 {
     using var db = DbManager.Create();
     db.Save(user);
     return(true);
 }
예제 #6
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public virtual bool Save(ResetUser user)
 {
     DbManager.Create().Save(user);
     return(true);
 }