You are here

function patron_create_patron in Library 5.2

Same name and namespace in other branches
  1. 6 patron/patron.module \patron_create_patron()
1 call to patron_create_patron()
patron_user in patron/patron.module
Implementation of hook_user().

File

patron/patron.module, line 583

Code

function patron_create_patron(&$edit, $user) {
  $node = (object) array(
    'type' => 'patron',
    'title' => check_plain($edit['name_last']) . ', ' . check_plain($edit['name_first']),
    'name' => $user->name,
    'uid' => $user->uid,
    'email' => $user->mail,
    'name_last' => check_plain($edit['name_last']),
    'name_first' => check_plain($edit['name_first']),
    'patron_uid' => $user->uid,
  );
  node_save($node);
}