You are here

public function SendinblueManager::getSubscriberByEmail in SendinBlue 8.2

Same name and namespace in other branches
  1. 8 src/SendinblueManager.php \Drupal\sendinblue\SendinblueManager::getSubscriberByEmail()

Get subscriber data by email on drupal table.

Parameters

string $email: An email address.

Return value

string A details of subscriber.

File

src/SendinblueManager.php, line 640

Class

SendinblueManager
Basic manager of module.

Namespace

Drupal\sendinblue

Code

public function getSubscriberByEmail($email) {
  $record = $this->connection
    ->select('sendinblue_contact', 'c')
    ->fields('c', [
    'email',
  ])
    ->condition('c.email', $email)
    ->execute()
    ->fetchAssoc();
  return $record;
}