Пример #1
0
        //激活用户请求
        public string ActiveUser()
        {
            string key       = Request["id"];
            string strUserId = Request["uid"];
            string value     = RedisHelper.Get <string>(key);

            if (string.IsNullOrEmpty(value))
            {
                return("激活用户请求已过期.");
            }
            if (strUserId != value)
            {
                return("激活用户失败.");
            }
            int userId = Convert.ToInt32(strUserId);
            //激活用户操作,IsActive=1
            UserBLL userBll = new UserBLL();

            if (!userBll.ActiveUser(userId))
            {
                return("激活用户失败.");
            }
            return("激活用户成功!<a href='/UserOperation/Login'>点击登录</a>");
        }