You are here

function simplenews_subscriber_load_by_uid in Simplenews 7

Same name and namespace in other branches
  1. 8 simplenews.module \simplenews_subscriber_load_by_uid()
  2. 7.2 simplenews.module \simplenews_subscriber_load_by_uid()

Load a simplenews newsletter subscriber object.

Parameters

$uid: Subscriber user id.

Return value

Newsletter subscriber object, FALSE if subscriber does not exist.

Related topics

1 call to simplenews_subscriber_load_by_uid()
simplenews_user_presave in ./simplenews.module
Implements hook_user_presave().

File

./simplenews.module, line 1562
Simplenews node handling, sent email, newsletter block and general hooks

Code

function simplenews_subscriber_load_by_uid($uid) {
  $subscribers = simplenews_subscriber_load_multiple(array(), array(
    'uid' => $uid,
  ));
  return $subscribers ? reset($subscribers) : FALSE;
}