- 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;
- }
复制代码 这就是密码的加密方式
密码是存在uc的用户表中,论坛中的密码是假的没有用的 |