You are here

function references_dialog_user_reference_add_link in References dialog 7

Add link callback for user references.

1 string reference to 'references_dialog_user_reference_add_link'
references_dialog_references_dialog_widgets in ./references_dialog.dialog_widgets.inc
Implements hook_references_dialog_widgets().

File

./references_dialog.dialog_widgets.inc, line 203
Implements dialogs for node reference and user reference fields.

Code

function references_dialog_user_reference_add_link($element, $widget_settings, $field, $instance) {
  $user_links = array();

  // Check permissions for adding users.
  if (user_access('administer users')) {
    $user_links[] = array(
      'title' => t('Create user'),
      'href' => 'admin/people/create',
    );
  }
  return $user_links;
}