You are here

public static function SubscriberInterface::loadByUid in Simplenews 8.2

Same name and namespace in other branches
  1. 3.x src/SubscriberInterface.php \Drupal\simplenews\SubscriberInterface::loadByUid()

Load a simplenews newsletter subscriber object by uid.

Parameters

int $uid: Subscriber user id.

bool $create: (optional) Whether to create a new subscriber if none exists. Defaults to TRUE.

Return value

\Drupal\simplenews\SubscriberInterface Newsletter subscriber entity, FALSE if subscriber does not exist.

1 method overrides SubscriberInterface::loadByUid()
Subscriber::loadByUid in src/Entity/Subscriber.php
Load a simplenews newsletter subscriber object by uid.

File

src/SubscriberInterface.php, line 217

Class

SubscriberInterface
Simplenews subscriber entity interface.

Namespace

Drupal\simplenews

Code

public static function loadByUid($uid, $create = FALSE);