首先打开你下载的UCENTER里面的样例代码,目录是exp..
1.打开config.php在里面增加
define('DZ_DBTABLEPRE', 'discuz.cdb_'); // DUSCIZ数据库表前缀
2.打开uc_clinet/model/user.php,找到
$this->db->query("INSERT INTO ".UC_DBTABLEPRE."memberfields SET uid='$uid'");
在下面增加
$tmp = $this->db->query("select count(*) from ".DZ_DBTABLEPRE."members where uid=".$uid);
if(!($userNotexist = $this->db->result($tmp))){
$sql = "insert into ".DZ_DBTABLEPRE."members (uid,username,email,groupid,timeoffset) values ({$uid},'{$username}','{$email}','10','9999')";
$sql = $this->db->query($sql);
$sql = "insert into ".DZ_DBTABLEPRE."memberfields (uid) values ({$uid})";
$sql = $this->db->query($sql);
}
这样即可完成自动激活功能.