get_canonical_user_id ()

Gets the canonical user ID and display name from the Amazon S3 server.

Access

public

Returns

Type

Description

array

An associative array containing the id and display_name values.

Related Methods

Source

Method defined in services/s3.class.php | Toggle source view (14 lines) | View on GitHub

public function get_canonical_user_id()
{
    if ($this->use_batch_flow)
    {
        throw new S3_Exception(__FUNCTION__ . '() cannot be batch requested');
    }

    $id = $this->list_buckets();

    return array(
        'id' => (string) $id->body->Owner->ID,
        'display_name' => (string) $id->body->Owner->DisplayName
    );
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback