lib/opauth/Strategy/Google/GoogleStrategy.php
private function userinfo($access_token){
		$userinfo = $this->serverGet('https://www.googleapis.com/oauth2/v1/userinfo', array('access_token' => $access_token), null, $headers);
		if (!empty($userinfo)){
			return $this->recursiveGetObjectVars(json_decode($userinfo));
		}
		else{
			$error = array(
				'code' => 'userinfo_error',
				'message' => 'Failed when attempting to query for user information',
				'raw' => array(
					'response' => $userinfo,
					'headers' => $headers
				)
			);

			$this->errorCallback($error);
		}
	}
private function userinfo($access_token){
		$userinfo = $this->serverGet('https://www.googleapis.com/oauth2/v1/userinfo', array('access_token' => $access_token), null, $headers);
		if (!empty($userinfo)){
			return $this->recursiveGetObjectVars(json_decode($userinfo));
		}
		else{
			$error = array(
				'code' => 'userinfo_error',
				'message' => 'Failed when attempting to query for user information',
				'raw' => array(
					'response' => $userinfo,
					'headers' => $headers
				)
			);

			$this->errorCallback($error);
		}
	}
private function userinfo ( $ access_token ) { $ userinfo = $ this -> serverGet ( 'https://www.googleapis.com/oauth2/v1/userinfo' , array ( 'access_token' => $ access_token ) , null , $ headers ) ; if ( ! empty ( $ userinfo ) ) { return $ this -> recursiveGetObjectVars ( json_decode ( $ userinfo ) ) ; } else { $ error = array ( 'code' => 'userinfo_error' , 'message' => 'Failed when attempting to query for user information' , 'raw' => array ( 'response' => $ userinfo , 'headers' => $ headers ) ) ; $ this -> errorCallback ( $ error ) ; } }
Queries Google API for user info

@param string $access_token
@return array Parsed JSON results
Queries Google API for user info