Esempio n. 1
0
        public ActionResult CheckCode()
        {
            string checkCode = CheckCodeHelper.GetEngAndNum(4);

            Session["CheckCode"] = checkCode;
            CookieHelper.Add("QTXgt7AC5q5aLlVLwpTw", checkCode, 10);
            return(File(CheckCodeHelper.CreateToByte(checkCode, false), @"image/jpeg"));
        }
Esempio n. 2
0
        public string Reset(string id)
        {
            if (string.IsNullOrEmpty(id) || TypeHelper.TypeToInt32(id, -1) < 0)
            {
                return(GeneralHandler.FBaseInfo);
            }
            var stateInfo = GeneralHandler.StateSuccess;

            if (int.Parse(id) == DawnauthHandler.UserId)
            {
                stateInfo = "不可对当前登录管理员进行密码重置操作!";
            }
            else
            {
                stateInfo  = "Dawn";
                stateInfo += CheckCodeHelper.GetEngAndNum(8);
                DawnAuthUserBLL.Update(int.Parse(id), CryptoHelper.MD5(stateInfo, true));
            }
            return(stateInfo);
        }