• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP uc_user_register函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中uc_user_register函数的典型用法代码示例。如果您正苦于以下问题:PHP uc_user_register函数的具体用法?PHP uc_user_register怎么用?PHP uc_user_register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了uc_user_register函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: _regToUCDZX

 /**
  * 在UC和DZX进行用户初始化注册
  * @access protected
  * @return boolen
  */
 function _regToUCDZX()
 {
     global $_G;
     $this->uid = (int) uc_user_register($this->username, $this->password, $this->email, $this->questionid, $this->answer);
     if ($this->uid > 0) {
         //在有UC的情况下,附属论坛的members表password列并不存储真实密码,只是用于cookies登陆状态校样。
         $init_arr = explode(',', $_G['setting']['initcredits']);
         $userdata = array('uid' => $this->uid, 'username' => $this->username, 'password' => md5(rand(100000, 999999)), 'email' => $this->email, 'adminid' => 0, 'groupid' => $this->groupid, 'regdate' => $this->timestamp, 'credits' => $init_arr[0], 'timeoffset' => 9999);
         DB::insert('common_member', $userdata);
         $status_data = array('uid' => $this->uid, 'regip' => $this->ip, 'lastip' => $this->ip, 'lastvisit' => $this->timestamp, 'lastactivity' => $this->timestamp, 'lastpost' => 0, 'lastsendmail' => 0);
         DB::insert('common_member_status', $status_data);
         $profile['uid'] = $this->uid;
         DB::insert('common_member_profile', $profile);
         DB::insert('common_member_field_forum', array('uid' => $this->uid));
         DB::insert('common_member_field_home', array('uid' => $this->uid));
         //初始化积分
         $count_data = array('uid' => $this->uid, 'extcredits1' => $init_arr[1], 'extcredits2' => $init_arr[2], 'extcredits3' => $init_arr[3], 'extcredits4' => $init_arr[4], 'extcredits5' => $init_arr[5], 'extcredits6' => $init_arr[6], 'extcredits7' => $init_arr[7], 'extcredits8' => $init_arr[8]);
         DB::insert('common_member_count', $count_data);
         DB::insert('common_setting', array('skey' => 'lastmember', 'svalue' => $this->username), false, true);
         manyoulog('user', $this->uid, 'add');
         return true;
     } else {
         return false;
     }
 }
开发者ID:chibimiku,项目名称:xweibo_for_discuz_x2_php7,代码行数:30,代码来源:xwbSiteUserRegister.class.php


示例2: user_register

 static function user_register($username, $password, $email)
 {
     global $kekezu;
     $member_obj = new Keke_witkey_member_class();
     $space_obj = new Keke_witkey_space_class();
     $slt = kekezu::randomkeys(6);
     $pwd = self::get_password($password, $slt);
     if ($kekezu->_sys_config['user_intergration'] == 2) {
         require_once S_ROOT . '/uc_client/client.php';
         $reg_uid = uc_user_register($username, $password, $email);
     }
     die;
     if ($reg_uid > 0 || $kekezu->_sys_config['user_intergration'] == '1') {
         $reg_uid and $member_obj->setUid($reg_uid);
         $member_obj->setEmail($email);
         $member_obj->setUsername($username);
         $member_obj->setPassword($pwd);
         $member_obj->setRand_code($slt);
         $reg_uid = $member_obj->create_keke_witkey_member();
         $space_obj->setUid($reg_uid);
         $kekezu->_sys_config[allow_reg_action] == 1 and $space_obj->setStatus(2) or $space_obj->setStatus(1);
         $space_obj->setUsername($username);
         $space_obj->setPassword($pwd);
         $space_obj->setSec_code($pwd);
         $space_obj->setEmail($email);
         $space_obj->setReg_time(time());
         $space_obj->setReg_ip(kekezu::get_ip());
         $space_obj->create_keke_witkey_space();
         $info = array('uid' => $reg_uid, 'username' => $username, 'email' => $email);
         $kekezu->_sys_config[allow_reg_action] == 1 and self::send_email_action_user($info);
         return $info;
     } else {
         return false;
     }
 }
开发者ID:xupnge1314,项目名称:project,代码行数:35,代码来源:keke_user_class.php


示例3: register

 function register()
 {
     $activeuser = uc_get_user($this->base->post['username']);
     if ($activeuser) {
         $this->base->message('该用户无需注册,请直接登录!<br><a href="index.php?user/login">继续</a>');
     }
     $uid = uc_user_register($this->base->post['username'], $this->base->post['password'], $this->base->post['email']);
     if ($uid <= 0) {
         if ($uid == -1) {
             $this->base->message('用户名不合法');
         } elseif ($uid == -2) {
             $this->base->message('包含要允许注册的词语');
         } elseif ($uid == -3) {
             $this->base->message('用户名已经存在');
         } elseif ($uid == -4) {
             $this->base->message('Email 格式有误');
         } elseif ($uid == -5) {
             $this->base->message('Email 不允许注册');
         } elseif ($uid == -6) {
             $this->base->message('该 Email 已经被注册');
         } else {
             $this->base->message('未定义');
         }
     } else {
         if (isset($this->base->post['access_token'])) {
             $uid = $_ENV['user']->add($this->base->post['username'], $this->base->post['password'], $this->base->post['email'], $uid, $this->base->post['access_token']);
         } else {
             $_ENV['user']->add($this->base->post['username'], $this->base->post['password'], $this->base->post['email'], $uid);
         }
         $_ENV['user']->refresh($uid);
         $ucsynlogin = uc_user_synlogin($uid);
         $this->base->message('注册成功' . $ucsynlogin . '<br><a href="' . $_SERVER['PHP_SELF'] . '">继续</a>');
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:34,代码来源:ucenter.class.php


示例4: addUserManually

function addUserManually($username, $password, $email = '[email protected]')
{
    @(include_once './common.php');
    @(include_once S_ROOT . 'uc_client/client.php');
    global $_SGLOBAL;
    global $_SC;
    $newuid = @uc_user_register($username, $password, $email);
    if ($newuid <= 0) {
        if ($newuid == -1) {
            showmessage('user_name_is_not_legitimate');
        } elseif ($newuid == -2) {
            showmessage('include_not_registered_words');
        } elseif ($newuid == -3) {
            showmessage('user_name_already_exists');
        } elseif ($newuid == -4) {
            showmessage('email_format_is_wrong');
        } elseif ($newuid == -5) {
            showmessage('email_not_registered');
        } elseif ($newuid == -6) {
            showmessage('email_has_been_registered');
        } else {
            showmessage('register_error');
        }
    } else {
        //register succeed
        $q_actionlog = $_SGLOBAL['db']->query("insert into " . $_SC['tablepre'] . "actionlog SET uid ='{$newuid}', action='register', dateline='" . $_SGLOBAL['timestamp'] . "'");
        return $newuid;
    }
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:29,代码来源:cp_parent_func.php


示例5: register

 function register($username, $password, $email, $type = 'g')
 {
     if (empty($username) || empty($password) || !validateEmail($email)) {
         return false;
     }
     $rt = uc_user_register($username . '#' . $type, $password, $email);
     if ($rt > 0) {
         return array('result' => $rt, 'message' => 'register success!!');
     }
     switch ($rt) {
         case -1:
             $return = array('result' => -1, 'message' => 'invalid username!!');
             break;
         case -2:
             $return = array('result' => -2, 'message' => 'illegal words has beed found!!');
             break;
         case -3:
             $return = array('result' => -3, 'message' => 'usename exist!!');
             break;
         case -4:
             $return = array('result' => -4, 'message' => 'invalid email address!!');
             break;
         case -5:
             $return = array('return' => -5, 'message' => 'email not allow!!');
             break;
         case -6:
             $return = array('return' => -6, 'message' => 'email has been used!!');
             break;
     }
     return $return;
 }
开发者ID:sjw-github,项目名称:lib,代码行数:31,代码来源:ucClient.ini.php


示例6: register

 /**
  * 注册新用户
  */
 public function register($username, $password, $email, $gender)
 {
     $this->_ucenter_init();
     $uc_uid = uc_user_register($username, $password, $email);
     if ($uc_uid < 0) {
         switch ($uc_uid) {
             case -1:
                 $this->_error = L('invalid_user_name');
                 break;
             case -2:
                 $this->_error = L('blocked_user_name');
                 break;
             case -3:
                 $this->_error = L('username_exists');
                 break;
             case -4:
                 $this->_error = L('email_error');
                 break;
             case -5:
                 $this->_error = L('blocked_email');
                 break;
             case -6:
                 $this->_error = L('email_exists');
                 break;
         }
         return false;
     }
     //返回本地数据
     return array('uc_uid' => $uc_uid, 'username' => $username, 'password' => $password, 'email' => $email, 'gender' => $gender);
 }
开发者ID:dlpc,项目名称:weixin_shop,代码行数:33,代码来源:ucenter.php


示例7: register

 function register($_username, $_password, $_email)
 {
     if ($this->ucenter_charset != 'utf-8') {
         $result = uc_user_register(convert_encoding($_username, 'utf-8', $this->ucenter_charset), $_password, $_email);
     } else {
         $result = uc_user_register($_username, $_password, $_email);
     }
     switch ($result) {
         default:
             $uid = $this->model('account')->user_register($_username, $_password, $_email);
             if (get_setting('register_valid_type') == 'N' or get_setting('register_valid_type') == 'email' and get_setting('register_type') == 'invite') {
                 $this->model('active')->active_user_by_uid($uid);
             }
             return array('user_info' => $this->model('account')->get_user_info_by_username($_username), 'uc_uid' => $result, 'username' => $_username, 'email' => $_email);
             break;
         case -1:
             return '用户名不合法';
             break;
         case -2:
             return '用户名包含不允许注册的词语';
             break;
         case -3:
             return '用户名已经存在';
             break;
         case -4:
             return 'Email 格式有误';
             break;
         case -5:
             return 'Email 不允许注册';
             break;
         case -6:
             return '该 Email 已经被注册';
             break;
     }
 }
开发者ID:Vizards,项目名称:HeavenSpree,代码行数:35,代码来源:ucenter.php


示例8: _syncUCenter

 private function _syncUCenter($uid, $email, $uname, $password)
 {
     if (UC_SYNC) {
         $uc_uid = uc_user_register($uname, $password, $email);
         if ($uc_uid) {
             ts_add_ucenter_user_ref($uid, $uc_uid, $uname);
         }
     }
 }
开发者ID:armebayelm,项目名称:thinksns-vietnam,代码行数:9,代码来源:UserRegisterService.class.php


示例9: zuitu_uc_register

function zuitu_uc_register($email, $username, $password) {
	if (!function_exists('uc_user_login')) return true;
	if (!defined('UC_API')) return true;
	if (strtolower(UC_CHARSET)!='utf-8') { 
		$username = mb_convert_encoding($username, UC_CHARSET, 'UTF-8'); 
		}
	$uid = uc_user_register($username, $password, $email);
	DB::Query('SET NAMES UTF8;');
	return $uid > 0;
}
开发者ID:noikiy,项目名称:mdwp,代码行数:10,代码来源:uc.php


示例10: user_register

function user_register($username, $password, $member_type = 0, $email, $uc_reg = true)
{
    global $db, $timestamp, $_CFG, $online_ip, $QS_pwdhash;
    $member_type = intval($member_type);
    $ck_username = get_user_inusername($username);
    $ck_email = get_user_inemail($email);
    if ($member_type == 0) {
        return -1;
    } elseif (!empty($ck_username)) {
        return -2;
    } elseif (!empty($ck_email)) {
        return -3;
    }
    $pwd_hash = randstr();
    $password_hash = md5(md5($password) . $pwd_hash . $QS_pwdhash);
    $setsqlarr['username'] = $username;
    $setsqlarr['password'] = $password_hash;
    $setsqlarr['pwd_hash'] = $pwd_hash;
    $setsqlarr['email'] = $email;
    $setsqlarr['utype'] = intval($member_type);
    $setsqlarr['reg_time'] = $timestamp;
    $setsqlarr['reg_ip'] = $online_ip;
    $insert_id = inserttable(table('members'), $setsqlarr, true);
    if ($member_type == "1") {
        if (!$db->query("INSERT INTO " . table('members_points') . " (uid) VALUES ('{$insert_id}')")) {
            return false;
        }
        if (!$db->query("INSERT INTO " . table('members_setmeal') . " (uid) VALUES ('{$insert_id}')")) {
            return false;
        }
        $points = get_cache('points_rule');
        include_once QISHI_ROOT_PATH . 'include/fun_company.php';
        set_consultant($insert_id);
        if ($points['reg_points']['value'] > 0) {
            report_deal($insert_id, $points['reg_points']['type'], $points['reg_points']['value']);
            $operator = $points['reg_points']['type'] == "1" ? "+" : "-";
            write_memberslog($insert_id, 1, 9001, $username, "新注册会员,({$operator}{$points['reg_points']['value']}),(剩余:{$points['reg_points']['value']})", 1, 1010, "注册会员系统自动赠送积分", "{$operator}{$points['reg_points']['value']}", "{$points['reg_points']['value']}");
            //积分变更记录
            write_setmeallog($insert_id, $username, "注册会员系统自动赠送:({$operator}{$points['reg_points']['value']}),(剩余:{$points['reg_points']['value']})", 1, '0.00', '1', 1, 1);
        }
        if ($_CFG['reg_service'] > 0) {
            set_members_setmeal($insert_id, $_CFG['reg_service']);
            $setmeal = get_setmeal_one($_CFG['reg_service']);
            write_memberslog($insert_id, 1, 9002, $username, "注册会员系统自动赠送:{$setmeal['setmeal_name']}", 2, 1011, "开通服务(系统赠送)", "-", "-");
            //套餐变更记录
            write_setmeallog($insert_id, $username, "注册会员系统自动赠送:{$setmeal['setmeal_name']}", 1, '0.00', '1', 2, 1);
        }
    }
    if (defined('UC_API') && $uc_reg) {
        include_once QISHI_ROOT_PATH . 'uc_client/client.php';
        $uc_reg_uid = uc_user_register($username, $password, $email);
    }
    write_memberslog($insert_id, $member_type, 1000, $username, "注册成为会员");
    return $insert_id;
}
开发者ID:dalinhuang,项目名称:yy,代码行数:55,代码来源:fun_user.php


示例11: UcenterReg

 public function UcenterReg($data)
 {
     $db = new dbstuff();
     $db->connect(UC_DBHOST, UC_DBUSER, UC_DBPW, UC_DBNAME, 0);
     $uid = uc_user_register($data['username'], $data['password'], $data['email']);
     if ($uid <= 0) {
         return $uid;
         /*	if($uid == -1) {
         				return '用户名不合法';
         			} elseif($uid == -2) {
         				return '包含要允许注册的词语';
         			} elseif($uid == -3) {
         				return '用户名已经存在';
         			} elseif($uid == -4) {
         				return 'Email 格式有误';
         			} elseif($uid == -5) {
         				return 'Email 不允许注册';
         			} elseif($uid == -6) {
         				return '该 Email 已经被注册';
         			} else {
         				return '未定义';
         			}*/
     } else {
         $username = $data['username'];
         $sql = "SELECT `username`,`password` FROM " . DZ_DBTABLEPRE . "common_member WHERE `uid`={$uid}";
         $result = $db->query($sql);
         if ($db->num_rows($result) == 0) {
             $sql = "SELECT `username`,`password` FROM " . UC_DBTABLEPRE . "members WHERE `uid`={$uid}";
             $result = $db->query($sql);
             $row = $db->fetch_array($result);
             //激活
             $sql = "insert into " . DZ_DBTABLEPRE . "common_member set regdate='" . time() . "',uid='{$uid}',email='" . $data['email'] . "',username='" . $data['username'] . "',password='" . $row['password'] . "',timeoffset=9999";
             $db->query($sql);
             $sql = "insert into " . DZ_DBTABLEPRE . "common_member_status set uid='{$uid}', regip='{$_SERVER['REMOTE_ADDR']}',lastip='{$_SERVER['REMOTE_ADDR']}',lastvisit=" . time() . ", lastactivity=" . time() . ',lastpost=0, lastsendmail=0';
             $db->query($sql);
             $sql = "insert into " . DZ_DBTABLEPRE . "common_member_profile set uid='{$uid}'";
             $db->query($sql);
             $sql = "insert into " . DZ_DBTABLEPRE . "common_member_field_forum set uid='{$uid}'";
             $db->query($sql);
             $sql = "insert into " . DZ_DBTABLEPRE . "common_member_field_home set uid='{$uid}' ";
             $db->query($sql);
             $sql = "insert into " . DZ_DBTABLEPRE . "common_member_count set uid='{$uid}' ";
             $db->query($sql);
             $db->query('UPDATE ' . DZ_DBTABLEPRE . "common_setting SET svalue='{$data['username']}' WHERE skey='lastmember'");
             //exit;
         }
     }
     unset($db);
     return $uid;
 }
开发者ID:shuai959980629,项目名称:TTDV1,代码行数:50,代码来源:Ucenter_model.php


示例12: register

 public function register($registration)
 {
     $this->initDiscuzApi();
     if (UC_CHARSET == 'gbk') {
         $registration['nickname'] = iconv('UTF-8', 'gb2312', $registration['nickname']);
     }
     $result = uc_user_register($registration['nickname'], $registration['password'], $registration['email']);
     if ($result < 0) {
         $result = $this->convertApiResult($result);
         throw new \RuntimeException("{$result[0]}:{$result[1]}");
     }
     $registration['id'] = $result;
     return $registration;
 }
开发者ID:fujianguo,项目名称:EduSoho,代码行数:14,代码来源:DiscuzAuthProvider.php


示例13: add

 /**
  * 添加会员
  */
 public function add()
 {
     if (isset($_POST['dosubmit'])) {
         $username = isset($_POST['username']) && trim($_POST['username']) ? trim($_POST['username']) : showmessage(L('nameerror'), HTTP_REFERER);
         $password = isset($_POST['password']) && trim($_POST['password']) ? trim($_POST['password']) : showmessage(L('password_can_not_be_empty'), HTTP_REFERER);
         $email = isset($_POST['email']) && is_email($_POST['email']) ? trim($_POST['email']) : showmessage(L('email_format_incorrect'), HTTP_REFERER);
         $regdate = SYS_TIME;
         if ($this->db->get_one(array('username' => $username))) {
             showmessage(L('user_already_exist'), HTTP_REFERER);
         } elseif ($this->db->get_one(array('email' => $email))) {
             showmessage(L('email_already_exist'), HTTP_REFERER);
         } else {
             if (strlen($password) > 20 || strlen($password) < 6) {
                 showmessage(L('password_len_error'), HTTP_REFERER);
             }
             $old_password = $password;
             list($password, $random) = creat_password($password);
             //UCenter会员注册
             $ucuserid = 0;
             if ($this->config['ucuse']) {
                 pc_base::load_config('uc_config');
                 include PHPCMS_PATH . 'api/uc_client/client.php';
                 $uid = uc_user_register($username, $old_password, $email, $random);
                 switch ($uid) {
                     case '-3':
                     case '-6':
                     case '-2':
                     case '-5':
                     case '-1':
                     case '-4':
                         showmessage(L('ucenter_error_code', array('code' => $uid)), HTTP_REFERER);
                         break;
                     default:
                         $ucuserid = $uid;
                         break;
                 }
             }
             if ($uid = $this->db->insert(array('username' => $username, 'password' => $password, 'random' => $random, 'email' => $email, 'regdate' => $regdate, 'lastdate' => SYS_TIME, 'type' => 'app', 'regip' => ip(), 'appname' => 'phpsso', 'ucuserid' => $ucuserid), 1)) {
                 /*插入消息队列*/
                 $noticedata = array('uid' => $uid, 'username' => $username, 'password' => $password, 'random' => $random, 'email' => $email, 'regip' => ip());
                 messagequeue::add('member_add', $noticedata);
                 showmessage(L('member_add') . L('operation_success'), 'm=admin&c=member&a=manage');
             } else {
                 showmessage(L('database_error'), HTTP_REFERER);
             }
         }
     } else {
         include $this->admin_tpl('member_add');
     }
 }
开发者ID:boylzj,项目名称:omguitar,代码行数:53,代码来源:member.php


示例14: user_register

 function user_register($reg_username, $reg_pwd, $reg_email, $reg_code, $check_code = true, $old_pwd = null, $reg_user_type, $reg_user_type_xf, $is_oauth = null)
 {
     global $kekezu;
     global $_lang;
     $reg_uid = null;
     $this->_reg_username = $reg_username = kekezu::escape($reg_username);
     $this->_reg_pwd = md5($reg_pwd);
     $this->_reg_email = $reg_email;
     $this->_check_code = $check_code;
     $this->_reg_user_type = $reg_user_type;
     //增加user_type
     $content = $this->check_all($reg_username, $reg_email, $reg_code, $is_oauth);
     if ($content !== true) {
         $tips['errors']['account'] = $content;
         kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
     }
     if ($kekezu->_sys_config['user_intergration'] == 2) {
         require_once S_ROOT . '/uc_client/client.php';
         $reg_uid = uc_user_register($this->_reg_username, $reg_pwd, $this->_reg_email);
         if ($reg_uid < 0) {
             switch ($reg_uid) {
                 case -1:
                     $msg = '用户名不合法';
                     break;
                 case -2:
                     $msg = '包含不允许注册的词语';
                     break;
                 case -3:
                     $msg = '用户名已经存在';
                     break;
                 case -4:
                     $msg = 'Email 格式有误';
                     break;
                 case -5:
                     $msg = 'Email 不允许注册';
                     break;
                 case -6:
                     $msg = '该 Email 已经被注册';
                     break;
                 default:
                     $msg = '未知错误';
                     break;
             }
             kekezu::show_msg($msg, NULL, 3, NULL, 'warning');
             die;
         }
     }
     return $this->save_userinfo($this->_reg_username, $this->_reg_email, $reg_uid, $this->_reg_user_type, $reg_user_type_xf);
 }
开发者ID:xupnge1314,项目名称:project,代码行数:49,代码来源:keke_register_class.php


示例15: _regToUCDZX

 /**
  * 在UC和DZX进行用户初始化注册
  * @access protected
  * @return boolen
  */
 function _regToUCDZX()
 {
     global $_G;
     $this->uid = (int) uc_user_register($this->username, $this->password, $this->email, $this->questionid, $this->answer);
     //----------------add by zh--------------------------
     $passp = new passport();
     $pass = $passp->useradd($this->uid, $this->username, $this->password, $this->email, $this->ip, $this->groupid, $this->nickname);
     //add
     if (is_array($pass)) {
         $psptuser = $passp->passport_setsession($pass, 2592000, $this->ip);
         //add
     } else {
         if ($pass == "userisexist") {
             uc_user_delete($this->uid);
             $this->uid = -3;
         } else {
             if ($pass == "nicknameexist") {
                 uc_user_delete($this->uid);
                 $this->uid = -7;
             } else {
                 uc_user_delete($this->uid);
                 $this->uid = -8;
             }
         }
     }
     //-------------add end-------------------------------
     if ($this->uid > 0) {
         //在有UC的情况下,附属论坛的members表password列并不存储真实密码,只是用于cookies登陆状态校样。
         $init_arr = explode(',', $_G['setting']['initcredits']);
         $userdata = array('uid' => $this->uid, 'username' => $this->username, 'password' => md5(rand(100000, 999999)), 'email' => $this->email, 'adminid' => 0, 'groupid' => $this->groupid, 'regdate' => $this->timestamp, 'credits' => $init_arr[0], 'timeoffset' => 9999);
         DB::insert('common_member', $userdata);
         $status_data = array('uid' => $this->uid, 'regip' => $this->ip, 'lastip' => $this->ip, 'lastvisit' => $this->timestamp, 'lastactivity' => $this->timestamp, 'lastpost' => 0, 'lastsendmail' => 0);
         DB::insert('common_member_status', $status_data);
         $profile['uid'] = $this->uid;
         $profile['field1'] = $this->nickname;
         //add by zh
         DB::insert('common_member_profile', $profile);
         DB::insert('common_member_field_forum', array('uid' => $this->uid));
         DB::insert('common_member_field_home', array('uid' => $this->uid));
         //初始化积分
         $count_data = array('uid' => $this->uid, 'extcredits1' => $init_arr[1], 'extcredits2' => $init_arr[2], 'extcredits3' => $init_arr[3], 'extcredits4' => $init_arr[4], 'extcredits5' => $init_arr[5], 'extcredits6' => $init_arr[6], 'extcredits7' => $init_arr[7], 'extcredits8' => $init_arr[8]);
         DB::insert('common_member_count', $count_data);
         DB::insert('common_setting', array('skey' => 'lastmember', 'svalue' => $this->username), false, true);
         manyoulog('user', $this->uid, 'add');
         return true;
     } else {
         return false;
     }
 }
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:54,代码来源:xwbSiteUserRegister.class.php


示例16: user_register

 /**
  * 会员注册
  * @param  $username 会员名, $password 密码, $email 邮件
  * @return bool
  */
 public function user_register($username, $password, $email)
 {
     $uid = uc_user_register($username, $password, $email);
     if ($uid > 0) {
         $ip = $this->input->ip_address();
         $time = time();
         $userdata = array('uid' => $uid, 'username' => $username, 'password' => $password, 'email' => $email, 'adminid' => 0, 'groupid' => 10, 'regdate' => $time, 'credits' => 0, 'timeoffset' => 9999);
         $this->db_uc->insert('common_member', $userdata);
         $status_data = array('uid' => $uid, 'regip' => $ip, 'lastip' => '', 'lastvisit' => $time, 'lastactivity' => $time, 'lastpost' => 0, 'lastsendmail' => 0);
         $this->db_uc->insert('common_member_status', $status_data);
         $this->db_uc->insert('common_member_profile', array('uid' => $uid));
         $this->db_uc->insert('common_member_field_forum', array('uid' => $uid));
         $this->db_uc->insert('common_member_field_home', array('uid' => $uid));
         $this->db_uc->insert('common_member_count', array('uid' => $uid));
         $this->db_uc->where('skey', 'lastmember');
         $this->db_uc->update('common_setting', array('svalue' => $username));
     }
     return $uid;
 }
开发者ID:chentaoz,项目名称:TourismWeb,代码行数:24,代码来源:uc_model.php


示例17: reg

 static function reg($username, $password, $email, $autologin = false)
 {
     $ip = get_client_ip();
     $zhuce = uc_user_register($username, $password, $email, '', '', $ip);
     if ($zhuce > 0) {
         if ($autologin) {
             self::$uid = $uid;
             self::$username = $username;
             self::$password = md5($password);
             self::$email = $email;
             setcookie(self::$authPre . 'auth', uc_authcode($uid . "\t" . $username . "\t" . md5($password) . "\t" . $email, 'ENCODE'));
         }
         return $zhuce;
         //返回UID
     } else {
         self::$lastAction = 'reg';
         self::$lastErrorCode = $zhuce;
         return FALSE;
     }
 }
开发者ID:zqstudio2015,项目名称:myweiphp,代码行数:20,代码来源:UcApi.php


示例18: authenticate

 /**
  * Authenticates a user.
  * The example implementation makes sure if the username and password
  * are both 'demo'.
  * In practical applications, this should be changed to authenticate
  * against some persistent user identity storage (e.g. database).
  * @return boolean whether authentication succeeds.
  */
 public function authenticate($oauth = false)
 {
     global $sysSettings;
     if (isset($sysSettings['partner']['mode']) && $sysSettings['partner']['mode'] == 'ucenter') {
         Yii::import('ext.ucenter.MUcenter', true);
         list($ucenterId, $username, $password, $email) = uc_user_login($this->username, $this->password, 2);
         $this->_authenticate($oauth);
         if ($ucenterId > 0 && $this->errorCode == self::ERROR_USERNAME_INVALID) {
             //说明网站数据库中没有,而ucenter中有这个用户,添加用户
             User::model()->addUser($email, $password, array('name' => $username, 'bio' => ' ', 'status' => 'ok'));
             $this->errorCode = self::ERROR_NONE;
         } else {
             if ($ucenterId > 0 && $this->errorCode == self::ERROR_PASSWORD_INVALID) {
                 $this->errorCode = self::ERROR_NONE;
             } else {
                 if ($ucenterId == -1 && $this->errorCode == self::ERROR_NONE) {
                     uc_user_register($this->userInfo->name, $this->password, $this->userInfo->email);
                 }
             }
         }
         $this->setState('ucenterId', $ucenterId);
     } else {
         $this->_authenticate($oauth);
     }
     if ($this->errorCode == self::ERROR_NONE) {
         $userInfo = $this->userInfo;
         $userInfo->upTime = time();
         $userInfo->save();
         //动态设为超级用户
         if ($userInfo->isAdmin) {
             Yii::app()->user->setIsSuperuser(true);
         }
         $this->_id = $userInfo->id;
         //用setState添加的变量会加入Yii::app()->user的属性中
         $this->setState('displayName', $userInfo->name);
     }
     return !$this->errorCode;
 }
开发者ID:stan5621,项目名称:eduwind,代码行数:46,代码来源:UserIdentity.php


示例19: register

 public function register($username, $password, $email)
 {
     /**
      * 会员注册
      */
     $uid = uc_user_register($username, $password, $email);
     //UCenter的注册验证函数
     if ($uid <= 0) {
         if ($uid == -1) {
             return '用户名不合法';
         } else {
             if ($uid == -2) {
                 return '包含不允许注册的词语';
             } else {
                 if ($uid == -3) {
                     return '用户名已经存在';
                 } else {
                     if ($uid == -4) {
                         return 'Email 格式有误';
                     } else {
                         if ($uid == -5) {
                             return 'Email 不允许注册';
                         } else {
                             if ($uid == -6) {
                                 return '该 Email 已经被注册';
                             } else {
                                 return '未定义';
                             }
                         }
                     }
                 }
             }
         }
     } else {
         return intval($uid);
         //返回一个非负数
     }
 }
开发者ID:zhezhisama,项目名称:zz,代码行数:38,代码来源:UcService.class.php


示例20: register

 /**
  * 用户注册
  *
  * @param string $username
  * @param string $password
  * @param string $email
  * @return int|string
  */
 public function register($username, $password, $email)
 {
     $uid = uc_user_register($username, $password, $email);
     if ($uid <= 0) {
         if ($uid == -1) {
             return '用户名不合法';
         } elseif ($uid == -2) {
             return '包含不允许注册的词语';
         } elseif ($uid == -3) {
             return '用户名已经存在';
         } elseif ($uid == -4) {
             return 'Email 格式有误';
         } elseif ($uid == -5) {
             return 'Email 不允许注册';
         } elseif ($uid == -6) {
             return '该 Email 已经被注册';
         } else {
             return '未定义';
         }
     } else {
         return intval($uid);
     }
 }
开发者ID:yunsite,项目名称:tp-coupon,代码行数:31,代码来源:UcService.class.php



注:本文中的uc_user_register函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP uc_user_synlogin函数代码示例发布时间:2022-05-23
下一篇:
PHP uc_user_login函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap