Ejemplo n.º 1
0
        public ActionResult updateAccount(string oldaccount, string account, string accounttype, string verifykey)
        {
            var code = Config.UserConfig.getVerifyCode(account);

            if (code != null && code.Code.Equals(verifykey.ToLower()))
            {
                using (var manage = new bitcms.Data.CMSManage())
                {
                    var userBindInfo = manage.getUserBindInfo(accounttype, account);
                    if (userBindInfo != null)
                    {
                        return(this.getResult(Entity.Error.错误, "该账号已经绑定"));
                    }
                    else
                    {
                        manage.updateUserCode(this.userOnlineInfo.UserId, accounttype, oldaccount, account);
                        return(this.getResult(manage.Error, manage.Message));
                    }
                }
            }
            else
            {
                return(this.getResult(Entity.Error.错误, "验证码错误或已经过期"));
            }
        }