PL_User::whoami() returns information about the user associated with the current API Key. Here is an example request:

// Returns information about the current API Key identity
PL_User::whoami();
// Returns information about the specified API Key identity
PL_User::whoami($custom_api_key='xxxxxxxxxxxx');

Parameters

The only optional parameter is $custom_api_key which allows you to specify a different API Key from your own..

Sample Output

array (
  'id' => 'xxxxxxxx0000000xxxxxxxx000000',
  'name' => 'Random Realty',
  'phone' => '+1617-555-1234',
  'website' => false,
  'is_verified' => true,
  'api_key_id' => 'xxxxxxxx0000000xxxxxxxx000000',
  'location' => 
  array (
    'address' => false,
    'locality' => false,
    'region' => false,
    'postal' => false,
    'neighborhood' => false,
    'country' => false,
    'latitude' => false,
    'longitude' => false,
  ),
  'provider' => 
  array (
    'id' => 'xxxxxxxx0000000xxxxxxxx000000',
    'name' => 'RandomRealtyFeed',
    'website' => false,
    'first_logo' => false,
    'second_logo' => false,
    'disclaimer' => 'The listing information featured on this site is courtesy of RandomRealty and is from various brokers who participate in IDX. The properties which appear for sale on this web site may subsequently have sold or may no longer be available.  The information is deemed reliable but is not guaranteed accurate and should be confirmed.',
    'disclaimer_on' => 
    array (
      'search' => true,
      'inline_search' => NULL,
      'listings' => true,
    ),
    'last_import' => '2013-06-20T19:13:58Z',
    'second_disclaimer' => '',
    'office_on' => 
    array (
      'search' => NULL,
      'inline_search' => true,
      'listings' => true,
    ),
  ),
  'providers' => false,
  'user' => 
  array (
    'id' => 'xxxxxxxx0000000xxxxxxxx000000',
    'first_name' => 'Matt',
    'last_name' => 'Barba',
    'email' => 'fake+xxxxxxxx0000000xxxxxxxx000000@placester.net',
    'phone' => '+16175551234',
    'website' => false,
  ),
  'disabled_publishers' => 
  array (
  ),
  'email' => 'fake+xxxxxxxx0000000xxxxxxxx000000@placester.net',
  'api_key_web_secret' => 'xxxxxxxx0000000xxxxxxxx000000',
  'api_key' => 
  array (
    'id' => 'xxxxxxxx0000000xxxxxxxx000000',
    'web_secret' => 'xxxxxxxx0000000xxxxxxxx000000',
    'install_id' => fake,
    'site_url' => NULL,
  ),
  'enabled_synd' => 
  array (
    'export' => true,
  ),
)