You are here

function usernodes_node_import_prepare in Node import 5

Implementation of hook_node_import_prepare().

File

supported/usernodes.inc, line 11
Support file for usernodes module.

Code

function usernodes_node_import_prepare(&$node, $preview = FALSE) {
  $errors = array();
  if (_usernodes_at_max($node->type, $node->uid)) {
    $user = user_load(array(
      'uid' => $node->uid,
    ));
    $errors[] = t('The user %name can not create any more nodes of this type.', array(
      '%name' => $user->name,
    ));
  }
  return $errors;
}