Home > CMS Tutorial > Empire CMS > Imperial CMS realizes the method of redirecting according to the member group after member registration.

Imperial CMS realizes the method of redirecting according to the member group after member registration.

silencement
Release: 2019-11-28 14:28:23
forward
2089 people have browsed it

Imperial CMS realizes the method of redirecting according to the member group after member registration.

If Empire cms wants to realize the ability to redirect according to the member group after member registration, it needs to modify the /e/member/class/member_registerfun.php file

Find the first Line 175, modified to the following code:

The code is as follows:

//审核
if($checked==0)
{
$location=DoingReturnUrl("../../",$_POST['ecmsfrom']);
printerror("RegisterSuccessCheck",$location,1);
}
$logincookie=0;
if($ecms_config['member']['regcookietime'])
{
$logincookie=time()+$ecms_config['member']['regcookietime'];
}
$r=$empire->fetch1("select ".eReturnSelectMemberF('*')." from ".eReturnMemberTable()." where ".egetmf('userid').
"='$userid' limit 1");
$set1=esetcookie("mlusername",$username,$logincookie);
$set2=esetcookie("mluserid",$userid,$logincookie);
$set3=esetcookie("mlgroupid",$groupid,$logincookie);
$set4=esetcookie("mlrnd",$rnd,$logincookie);
//验证符
qGetLoginAuthstr($userid,$username,$rnd,$groupid,$logincookie);
//登录附加cookie
AddLoginCookie($r);
if($groupid==1)
{
$location="地址1";
}
elseif($groupid==2)
{
$location="地址2";
}
$returnurl=getcvar('returnurl');
if($returnurl&&!strstr($returnurl,"e/member/iframe")&&!strstr($returnurl,"e/member/register")&&!strstr($returnurl,
"enews=exit"))
{
$location=$returnurl;
}
$set5=esetcookie("returnurl","");
//易通行系统
DoEpassport('reg',$userid,$username,$truepassword,$salt,$email,$groupid,$registertime);
$location=DoingReturnUrl($location,$_POST['ecmsfrom']);
printerror("RegisterSuccess",$location,1);
}
else
{printerror("DbError","history.go(-1)",1);}
}
?>
Copy after login

It is recommended to study "Empire cms tutorial"

among them:

The code is as follows:

if($groupid==1)
{
$location="地址1";
}
elseif($groupid==2)
{
$location="地址2";
}
Copy after login

is the added jump code.

The above is the detailed content of Imperial CMS realizes the method of redirecting according to the member group after member registration.. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:www.word666.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template