Thanks to Robin at Coinbase support, I got an answer. Here's an example showing how to grab some user details via the Coinbase OAUTH2 API in PHP.
In this example, these functions are added to coinbase-php/lib/Coinbase.php, inside the Coinbase class:
class Coinbase
{
/*...Existing functions here*/
/*New stuff...*/
public function getUserID()
{
return $this->get("users", array())->users[0]->user->id;
}
public function getUserName()
{
return $this->get("users", array())->users[0]->user->name;
}
public function getUserEmail()
{
return $this->get("users", array())->users[0]->user->email;
}
public function getUserTimeZone()
{
return $this->get("users", array())->users[0]->user->time_zone;
}
public function getUserNativeCurrency()
{
return $this->get("users", array())->users[0]->user->native_currency;
}
Notes
The "users" corresponds to the full API address call: "GET https://coinbase.com/api/v1/users".
The users API response is somewhat odd in that it appears to be designed to return multiple users via an array, even though it is defined as returning the "current user" info. That's why we have to add the "[0]" in the object for each of these functions.