You are here

function message_example_user_insert in Message 7

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

Implements hook_user_insert()

File

message_example/message_example.module, line 61

Code

function message_example_user_insert(&$edit, $account, $category) {
  $message = message_create('example_user_register', array(), $account);
  $wrapper = entity_metadata_wrapper('message', $message);
  $wrapper->field_published
    ->set($account->status);
  $wrapper
    ->save();
}