You are here

function message_example_user_insert in Message 8

Same name and namespace in other branches
  1. 7 message_example/message_example.module \message_example_user_insert()

Implements hook_user_insert().

File

modules/message_example/message_example.module, line 37
Holds hook implementation for the Message example module.

Code

function message_example_user_insert(User $account) {
  Message::create([
    'template' => 'example_user_register',
    'uid' => $account
      ->id(),
  ])
    ->save();
}