Community Documentation

hook_info

5 authentication.php hook_info($field = 0)

Declare authentication scheme information.

This hook is required of authentication modules. It defines basic information about the authentication scheme.

Parameters

$field: The type of information requested. Possible values:

  • "name"
  • "protocol"

Return value

A string containing the requested piece of information. If $field is not provided, an array containing all the fields should be returned.

Related topics

▾ 16 functions implement hook_info()

blogapi_blogger_get_user_info in modules/blogapi/blogapi.module
Blogging API callback. Returns profile information about a user.
blog_node_info in modules/blog/blog.module
Implementation of hook_node_info().
book_node_info in modules/book/book.module
Implementation of hook_node_info().
color_get_info in modules/color/color.module
Retrieve the color.module info for a particular theme.
drupal_info in modules/drupal/drupal.module
Implementation of hook_info().
fileupload_node_info in developer/examples/fileupload.module
Implementation of hook_node_info.
forum_node_info in modules/forum/forum.module
Implementation of hook_node_info().
hook_node_info in developer/hooks/node.php
Define module-provided node types.
image_get_info in includes/image.inc
Get details about an image.
multipage_form_example_node_info in developer/examples/multipage_form_example.module
Implementation of hook_node_info().
node_example_node_info in developer/examples/node_example.module
Implementation of hook_node_info(). This function replaces hook_node_name() and hook_node_types() from 4.6. Drupal 5 expands this hook significantly.
poll_node_info in modules/poll/poll.module
Implementation of hook_node_info().
REQUIREMENT_INFO in includes/install.inc
theme_filter_tips_more_info in modules/filter/filter.module
theme_node_example_order_info in developer/examples/node_example.module
A custom theme function.
_element_info in includes/form.inc
Retrieve the default properties for the defined element type.

File

developer/hooks/authentication.php, line 74
These hooks are defined by authentication modules, modules that define ways users can log on using accounts from other sites and servers.

Code

<?php
function hook_info($field = 0) {
  $info['name'] = 'Drupal';
  $info['protocol'] = 'XML-RPC';

  if ($field) {
    return $info[$field];
  }
  else {
    return $info;
  }
}
?>
Login or register to post comments