Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
externalauth.module 797 B
<?php

/**
 * @file
 * Contains externalauth.module.
 */

use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function externalauth_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    // Main module help for the authmap module.
    case 'help.page.externalauth':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Authenticates users using an external site / service and stores identification details.') . '</p>';
      return $output;

    default:
  }
}

/**
 * Implements hook_user_delete().
 */
function externalauth_user_delete($account) {
  // Delete authmap entries when a user gets deleted.
  $authmap = \Drupal::service('externalauth.authmap');
  $authmap->delete($account->id());
}