Skip to content

Instantly share code, notes, and snippets.

@msankhala
Created March 16, 2019 08:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msankhala/d9fecd6d714458b1b567151a5d738bc8 to your computer and use it in GitHub Desktop.
Save msankhala/d9fecd6d714458b1b567151a5d738bc8 to your computer and use it in GitHub Desktop.
create custom info hook.
<?php
// Drupal 7 implement your custom hook_info()
/**
* Gets information about a authentication module.
*
* @param string $module
* The module to get info for.
* @return mixed
* The information array, or FALSE if the information wasn't found.
*/
function services_authentication_info($module) {
$info = FALSE;
if (!empty($module) && module_exists($module) && is_callable($module . '_services_authentication_info')) {
$info = call_user_func($module . '_services_authentication_info');
}
return $info;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment