You are here

public function People::peopleFindByEmail in Flickr API Integration 8

Return a user's NSID, given their email address.

Parameters

string $email: Email to look for.

bool $cacheable: Cacheable.

Return value

array Response from the flickr method flickr.people.findByEmail. (https://www.flickr.com/services/api/flickr.people.findByEmail.html)

File

src/Service/People.php, line 133

Class

People
Class People.

Namespace

Drupal\flickr_api\Service

Code

public function peopleFindByEmail($email, $cacheable = TRUE) {
  $args = [
    'find_email' => $email,
  ];
  $response = $this->client
    ->request('flickr.people.findByEmail', $args, $cacheable);
  if ($response) {
    return $response['user'];
  }
  return FALSE;
}