首页 新闻 赞助 找找看

asp.net和UCenter论坛同步问题。

0
悬赏园豆:30 [已关闭问题] 关闭于 2014-08-26 09:23

UCenter论坛同步的时候当前注册的用户能同步上论坛,而以前注册的用户(就是那时候还没做论坛同步)死活同步不上,

这个不返回那一串HTML代码

贴上代码,这个代码是如果没注册过论坛先注册乱弹,注册过后再登陆。

 DS.Web.UCenter.Client.IUcClient client3 = new DS.Web.UCenter.Client.UcClient();
  var user = client3.UserLogin(username, password);//登陆
                        if (user.Success && user.UserName != "")//判断是否登陆成功
                        {
                            //判断用户返回值,判断是否合法
                            if (user.Uid == -1)
                            {
                                return "DZ论坛同步:用户名不存在或被删除!";
                            }
                            if (user.Uid == -2)
                            {
                                return "DZ论坛同步登陆:密码错误或者不符合规则!";
                            }
                            if (user.Uid == -3)
                            {
                                return "DZ论坛同步登陆:安全提问题没有输入!";
                            }
                            //web.DAL.web_Member.UpUcentID(user.Uid, username);
                            return string.Format("0,{0}<script type='text/javascript'>window.parent.parent.location = window.parent.parent.location;</script>", client3.UserSynlogin(user.Uid));//返回同步脚本,进行同步登陆
                        }
                        else
                        {
                            DS.Web.UCenter.Client.IUcClient client2 = new DS.Web.UCenter.Client.UcClient();
                            var userback = client2.UserRegister(username, Common.PublicFc.NoHTML(password), email);
                            if (userback.Uid == -1)
                            {
                                return "DZ论坛同步注册:用户名不合法!";
                            }
                            if (userback.Uid == -2)
                            {
                                return "DZ论坛同步注册:包含不允许注册的词语!";
                            }
                            if (userback.Uid == -3)
                            {
                                return "DZ论坛同步注册:用户名已经存在!";
                            }
                            if (userback.Uid == -4)
                            {
                                return "DZ论坛同步注册:Email 格式有误!";
                            }
                            if (userback.Uid == -5)
                            {
                                return "DZ论坛同步注册:Email 不允许注册!";
                            }
                            if (userback.Uid == -6)
                            {
                                return "DZ论坛同步注册:该 Email 已经被注册!";
                            }

                            DS.Web.UCenter.Client.IUcClient client6 = new DS.Web.UCenter.Client.UcClient();
                            var userDL = client6.UserLogin(username, password);//登陆
                            if (userDL.Success)//判断是否登陆成功
                            {
                                //判断用户返回值,判断是否合法
                                if (userDL.Uid == -1)
                                {
                                    return "DZ论坛同步:用户名不存在或被删除!";
                                }
                                if (userDL.Uid == -2)
                                {
                                    return "DZ论坛同步登陆:密码错误或者不符合规则!";
                                }
                                if (userDL.Uid == -3)
                                {
                                    return "DZ论坛同步登陆:安全提问题没有输入!";
                                }
                                web.DAL.web_Member.UpUcentID(userDL.Uid, username);
                                return string.Format("0,<script type='text/javascript'>window.parent.parent.location = window.parent.parent.location;</script>,{0}", client6.UserSynlogin(userDL.Uid));//返回同步脚本,进行同步登陆
                            }
                            else
                            {
                                return "0";
                            }

lhyterry的主页 lhyterry | 初学一级 | 园豆:102
提问于:2014-08-25 09:00
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册