You are here

function simplenews_user_create in Simplenews 8.2

Same name and namespace in other branches
  1. 8 simplenews.module \simplenews_user_create()
  2. 3.x simplenews.module \simplenews_user_create()

Implements hook_ENTITY_TYPE_create().

File

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

Code

function simplenews_user_create(UserInterface $account) {

  // Copy values for shared fields from existing subscriber.
  if ($subscriber = Subscriber::loadByMail($account
    ->getEmail())) {
    $subscriber
      ->copyToAccount($account);
  }
}