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

▾ 15 functions implement hook_info()

blogapi_blogger_get_user_info in modules/blogapi.module
Blogging API callback. Returns profile information about a user.
blog_node_info in modules/blog.module
Implementation of hook_node_info().
book_node_info in modules/book.module
Implementation of hook_node_info().
drupal_info in modules/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.module
Implementation of hook_node_info().
hook_node_info in developer/hooks/node.php
Define the human-readable name of a node type.
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.
page_node_info in modules/page.module
Implementation of hook_node_info().
poll_node_info in modules/poll.module
Implementation of hook_node_info().
story_node_info in modules/story.module
Implementation of hook_node_info().
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 66
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