function simplenews_subscriber_load_by_uid in Simplenews 7.2
Same name and namespace in other branches
- 8 simplenews.module \simplenews_subscriber_load_by_uid()
- 7 simplenews.module \simplenews_subscriber_load_by_uid()
Load a simplenews newsletter subscriber object.
Parameters
$uid: Subscriber user id.
Return value
SimplenewsSubscriber Newsletter subscriber entity, 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 1766 - 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;
}