src/thinkextend/oauth/driver/Renren.php
public function getOauthInfo()
    {
        $data = $this->call('users.getInfo');

        if (!isset($data['error_code'])) {
            $userInfo['type']   = 'RENREN';
            $userInfo['name']   = $data[0]['name'];
            $userInfo['nick']   = $data[0]['name'];
            $userInfo['avatar'] = $data[0]['headurl'];
            return $userInfo;
        } else {
            E("获取人人网用户信息失败：{$data['error_msg']}");
        }
    }
public function getOauthInfo()
    {
        $data = $this->call('users.getInfo');

        if (!isset($data['error_code'])) {
            $userInfo['type']   = 'RENREN';
            $userInfo['name']   = $data[0]['name'];
            $userInfo['nick']   = $data[0]['name'];
            $userInfo['avatar'] = $data[0]['headurl'];
            return $userInfo;
        } else {
            E("获取人人网用户信息失败：{$data['error_msg']}");
        }
    }
public function getOauthInfo ( ) { $ data = $ this -> call ( 'users.getInfo' ) ; if ( ! isset ( $ data [ 'error_code' ] ) ) { $ userInfo [ 'type' ] = 'RENREN' ; $ userInfo [ 'name' ] = $ data [ 0 ] [ 'name' ] ; $ userInfo [ 'nick' ] = $ data [ 0 ] [ 'name' ] ; $ userInfo [ 'avatar' ] = $ data [ 0 ] [ 'headurl' ] ; return $ userInfo ; } else { E ( "获取人人网用户信息失败：{$data['error_msg']}"); } }
获取当前登录的用户信息
@return array
获取当前登录的用户信息