当前位置: 首页>>代码示例>>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;未经允许,请勿转载。