You are here

externalauth.module in External Authentication 8

Same filename and directory in other branches
  1. 2.0.x externalauth.module

File

externalauth.module
View source
<?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());
}

Functions

Namesort descending Description
externalauth_help Implements hook_help().
externalauth_user_delete Implements hook_user_delete().