當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserInfo::getUserInfo方法代碼示例

本文整理匯總了PHP中UserInfo::getUserInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserInfo::getUserInfo方法的具體用法?PHP UserInfo::getUserInfo怎麽用?PHP UserInfo::getUserInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UserInfo的用法示例。


在下文中一共展示了UserInfo::getUserInfo方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: exit

// | WE CAN DO IT JUST FREE
// +----------------------------------------------------------------------
// | Copyright http://bbs.baijiacms.com Licensed under the Apache License, Version 2.0
// +----------------------------------------------------------------------
// | Author: 百家威信 <http://bbs.baijiacms.com>
// +----------------------------------------------------------------------
defined('SYSTEM_IN') or exit('Access Denied');
$alipaythirdlogin = mysqld_select("SELECT * FROM " . table('thirdlogin') . " WHERE enabled=1 and `code`='alipay'");
if (!empty($alipaythirdlogin) && !empty($alipaythirdlogin['id'])) {
    require_once WEB_ROOT . '/includes/lib/alipaySDK/config.php';
    require_once WEB_ROOT . '/includes/lib/alipaySDK/AopSdk.php';
    if (!empty($_GP["auth_code"])) {
        $auth_code = $_GP["auth_code"];
        require_once WEB_ROOT . '/includes/lib/alipaySDK/UserInfo.php';
        $userinfo = new UserInfo();
        $alipay_user = $userinfo->getUserInfo($auth_code);
        if (!empty($alipay_user)) {
            $alipay_openid = $user_info_resp->user_id;
            if (!empty($alipay_openid) && (!empty($_SESSION[MOBILE_ALIPAY_OPENID]) && $_SESSION[MOBILE_ALIPAY_OPENID] != $alipay_openid) || empty($_SESSION[MOBILE_ALIPAY_OPENID])) {
                $nickname = characet($user_info_resp->deliver_fullname);
                $follow = 1;
                $avatar = $user_info_resp->avatar;
                $gender = $user_info_resp->gender;
                $gender = $gender == 'F' ? 2 : ($gender == 'M' ? 1 : 0);
                $fans = mysqld_select("SELECT * FROM " . table('alipay_alifans') . " WHERE alipay_openid=:alipay_openid ", array(':alipay_openid' => $alipay_openid));
                if (empty($fans['alipay_openid'])) {
                    $row = array('nickname' => $nickname, 'follow' => $follow, 'gender' => intval($gender), 'alipay_openid' => $alipay_openid, 'avatar' => '', 'createtime' => TIMESTAMP);
                    mysqld_insert('alipay_alifans', $row);
                    if (!empty($avatar)) {
                        mysqld_update('alipay_alifans', array('avatar' => $avatar), array('alipay_openid' => $alipay_openid));
                    }
開發者ID:jasonhzy,項目名稱:bjcms2.3,代碼行數:31,代碼來源:lib_alipay.php

示例2: UserInfo

<meta name="viewport"
	content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<!-- <a href="wap.php?param=msg">發送消息</a><br></br> -->
	<a href="index.php?param=qr">生成二維碼</a>
	<br> <a href="index.php?param=follow">獲取關注列表</a> <br> <a
			href="index.php?param=gis">獲取地理位置</a>
			<br><a href="./wappay/">Wap支付測試</a>
<?php 
if (!empty(HttpRequest::getRequest("auth_code"))) {
    $auth_code = HttpRequest::getRequest("auth_code");
    require_once 'UserInfo.php';
    $userinfo = new UserInfo();
    $userinfo->getUserInfo($auth_code);
}
// if (HttpRequest::getRequest ( "param" ) == "msg"){
// 	$push = new PushMsg ();
// 	$image_text_msg1 = $push->mkImageTextMsg ( "標題,發消息測試", "描述:發消息測試", "http://wap.taobao.com", "", "loginAuth" );
// 	$image_text_msg = array (
// 			$image_text_msg1
// 	);
// 	require_once 'Message.php';
// 	$biz_content = HttpRequest::getRequest ( "biz_content" );
// 	echo "biz_conteng:".$biz_content;
// 	exit();
// 	$msg=new Message($biz_content);
// 	$FromUserId = $msg->getNode ( $biz_content, "FromUserId" );
// 	// 發給這個關注的用戶
// 	$biz_content = $push->mkImageTextBizContent ( $FromUserId, $image_text_msg );
開發者ID:tiantuikeji,項目名稱:fy,代碼行數:31,代碼來源:index.php


注:本文中的UserInfo::getUserInfo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。