帝国cms需要修改/e/member/class/member _ registerfun.php文件,找到第175行,修改成以下代码:
代码如下:
//查看
如果($checked==0)
{
$ location = DoingReturnUrl(quot;../../quot;,$ _ POST[# 39;ecmsfrom # 39]);
print error(quot;RegisterSuccessCheckquot,$location,1);
}
$ log in cookie = 0;
if($ecms _ config[# 39;成员# 39;][#39;regcookietime # 39])
{
$ log in cookie = time()+$ ecms _ config[# 39;成员# 39;][#39;regcookietime # 39];
}
$ r = $ empire -gt;fetch 1(quot;选择quot。eReturnSelectMemberF(# 39;*#39;).quot来自quot。eReturnMemberTable()。quot其中quot。ege tmf(# 39;用户# 39).
quot=#39;$ userid # 39限制1quot);
$ set1 = ESET cookie(quot;mlusernamequot,$username,$ log in cookie);
$ set 2 = ESET cookie(quot;mluseridquot,$userid,$ log in cookie);
$ set 3 = ESET cookie(quot;mlgroupidquot,$groupid,$ log in cookie);
$ set 4 = ESET cookie(quot;mlrndquot,$rnd,$ log in cookie);
//验证者
qGetLoginAuthstr($userid,$username,$rnd,$groupid,$ logincookie);
//登录附加cookie
AddLoginCookie($ r);
if($groupid==1)
{
$ location = quot地址1quot;
}
elseif($groupid==2)
{
$ location = quot地址2quot;
}
$ returnurl = getcvar(# 39;returnurl # 39);
if($ returnurlamp;amp!strstr($returnurl,quote/member/iframe quot;)ampamp!strstr($returnurl,quote/成员/注册员quot;)ampamp!strstr($returnurl,
quotenews = exitquot))
{
$ location = $ returnurl
}
$ set 5 = ESET cookie(quot;returnurlquot,quotquot);
//轻松访问系统
doe passport(# 39;reg # 39、$userid、$username、$truepassword、$salt、$email、$groupid、$ register time);
$ location = DoingReturnUrl($ location,$ _ POST[# 39;ecmsfrom # 39]);
print error(quot;注册成功quot;,$location,1);
}
其他
{ print error(quot;DbErrorquot,quothistory . go(-1)quot;,1);}
}
?gt;登录后复制
