|
发表于 2018-2-26 14:02:15
|
显示全部楼层
|阅读模式
来自 中国–河南–新乡–牧野区
很多朋友在用dedecms建站的时候都会遇到与discuz整合的问题下面将介绍的是使Discuz同步到DEDE会员默认到企业会员
从DZ注册的会员如果登陆到DEDE 如何弄默认为企业会员呢,现在默认是个人会员
修改member里的 index_do.php281行个人 改成企业换下相关字段就好了源码我贴上了
- if(defined(‘UC_API’) && @include_once DEDEROOT.’/uc_client/client.php’)
- {
- //检查帐号
- list($uid, $username, $password, $email) = uc_user_login($userid, $pwd);
- if($uid > 0) {
- $password = md5($password);
- //当UC存在用户,而CMS不存在时,就注册一个
- if(!$rs) {
- //会员的默认金币
- $row = $dsql->GetOne(“SELECT `money`,`scores` FROM `dede_arcrank` WHERE `rank`=’10′ “);
- $scores = is_array($row) ? $row['scores'] : 0;
- $money = is_array($row) ? $row['money'] : 0;
- $logintime = $jointime = time();
- $loginip = $joinip = GetIP();
- $res = $dsql->ExecuteNoneQuery(“INSERT INTO dede_member SET `mtype`=’企业 ‘,`userid`=’$username’,`pwd`=’$password’,`uname`=’$username’,`**`=’男’ ,`rank`=’10′,`money`=’$money’, `email`=’$email’, `scores`=’$scores’, `matt`=’0′, `face`=”,`safequestion`=’0′,`safeanswer`=”, `jointime`=’$jointime’,`joinip`=’$joinip’,`logintime`=’$logintime’,`loginip`=’$loginip’;”);
- if($res) {
- $mid = $dsql->GetLastID();
- $data = array
- (
- 0 => “INSERT INTO `dede_member_company` SET `mid`=’$mid’, `company`=’请修改公司名’, `product`=’请选主营类别’, `place`=’1519′, `vocation`=’0′, `cosize `=’0′, `tel`=’0′, `fax`=’0′, `linkman`=’$username’, `address`=’请修改’ ,
- `mobile`=’0′, `email`=’$email’, `url`=’http://www.dqz.me’, `uptime`=’0′, `introduce`=’0′, `comface`=’0′;”,
- 1 => “INSERT INTO `dede_member_tj` SET `mid`=’$mid’,`article`=’0′,`album`=’0′,`archives`=’0′,`homecount`=’0′,`pagecount`=’0′,`feedback`=’0′,`friend`=’0′,`stow`=’0′;”,
- 2 => “INSERT INTO `dede_member_space` SET `mid`=’$mid’,`pagesize`=’10′,`matt`=’0′,`spacename`=’{$uname}的[url=http://bbs.piaoxian.net/thread-72809-1-1.html]空间[/url] ‘,`spacelogo`=”,`spacestyle`=’person’, `sign`=”,`spacenews`=”;”,
- 3 => “INSERT INTO `dede_member_flink` SET `mid`=’$mid’, `title`=’织梦内容管理系统’, `url`=’http://www.dedecms.com’;”
- );
- foreach($data as $val) $dsql->ExecuteNoneQuery($val);
- }
- }
复制代码
另外提醒你一下 务必备份原来文件
|
|