ucenter整合过程中 免激活技巧,注意,此处的uc_client为客户端应用的uc_client.
- //注册时直接同步信息免激活uc_client/model/user.php
- function add_user($username, $password, $email, $uid = 0, $questionid = '', $answer = '', $regip = '') {
- $regip = emptyempty($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'");
- $this->db->query("INSERT INTO `数据库名称`.论坛会员表名 set uid='$uid',username='$username',password='$password',email='$email'"); return $uid;
- }
新闻热点
疑难解答