这个需要你写过小脚本,往 uc 插入。 你看下uc中添加用户的机制吧
uc_server/model/user.php 部分的- function add_user($username, $password, $email, $uid = 0, $questionid = '', $answer = '', $regip = '') {
- $regip = empty($regip) ? $this->base->onlineip : $regip;
- $salt = substr(uniqid(rand()), -6);
- $password = md5(md5($password).$salt);
- $sqladd = $uid ? "uid='".intval($uid)."'," : '';
- $sqladd .= $questionid > 0 ? " secques='".$this->quescrypt($questionid, $answer)."'," : " secques='',";
- $this->db->query("INSERT INTO ".UC_DBTABLEPRE."members SET $sqladd username='$username', password='$password', email='$email', regip='$regip', regdate='".$this->base->time."', salt='$salt'");
- $uid = $this->db->insert_id();
- $this->db->query("INSERT INTO ".UC_DBTABLEPRE."memberfields SET uid='$uid'");
- return $uid;
- }
复制代码 |