Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Google_Sheet_Helpers::api_user_info()

The user info from API.

Contents


Return Return

(void|null|array)


Source Source

File: src/integrations/google-sheet/helpers/google-sheet-helpers.php

	public function api_user_info() {
		$client = $this->get_google_client();
		if ( empty( $client['scope'] ) ) {
			return;
		}
		$scope = $client['scope'];
		if ( ! ( strpos( $scope, self::SCOPE_USERINFO ) || strpos( $scope, self::SCOPE_USER_EMAIL ) ) ) {
			return;
		}
		$body = array(
			'action' => 'user_info',
		);
		$response = $this->api_call( $body );
		return $response;
	}