You are here

function samlauth_user_fields_help in SAML Authentication 8.3

Same name and namespace in other branches
  1. 4.x modules/samlauth_user_fields/samlauth_user_fields.module \samlauth_user_fields_help()

Implements hook_help().

File

modules/samlauth_user_fields/samlauth_user_fields.module, line 14
Hook implementations for the samlauth_user_fields module.

Code

function samlauth_user_fields_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {

    // We need substantial explanatory text on top of the list page.
    case 'samlauth_user_fields.list':
      $output = '';
      $output .= '<p>' . t('At this moment, you need to know all SAML attribute names in order to be able to input them in the "Add mapping" screen. This is possible, among others, by inspecting SAML messages logged in the "Recent log messages", after enabling "Log incoming SAML messages".') . '</p>';
      if (\Drupal::config(SamlController::CONFIG_OBJECT_NAME)
        ->get('map_users')) {
        $output .= '<p>' . t('Any number in the "Use for linking" column (including 0) represents an attempt to match the value(s) in the SAML attributes to an existing Drupal user, if they are not linked to a user yet. The values/fields for each number are matched, in increasing order; if multiple mappings have the same number, the combination of both values must match the corresponding fields. Matching is only done if all corresponding SAML attributes actually have a value.') . '</p>';
      }
      else {
        \Drupal::messenger()
          ->addStatus(t('Linking options will be available when enabled in the main settings.'));
      }
      return $output;
  }
}