You are here

function ldapauth_submodules in LDAP integration 6

Get ldap "submodules" info that effects the feature components.

TODO: should use a hook(s) to get these rather than hardcoding them.

Parameters

String $component:

Array info:

3 calls to ldapauth_submodules()
ldap_servers_features_export in ./ldapauth.features.inc
Implementation of hook_features_export [component hook]
ldap_settings_features_export in ./ldapauth.features.inc
Implementation of hook_features_export [component hook]
ldap_settings_features_export_options in ./ldapauth.features.inc
Implementation of hook_features_export_options. [component_hook]

File

./ldapauth.features.inc, line 222
Feature related functions.

Code

function ldapauth_submodules($component, &$info = NULL) {
  switch ($component) {
    case 'ldap_servers':
      if ($info) {
        return;

        // Hmmm should not be here
      }
      return array(
        'ldapdata',
        'ldapgroups',
      );

    // sync has no server settings
    case 'ldap_settings':
      if ($info) {
        if (module_exists('ldapdata')) {
          $info['ldapdata_disable_picture_change'] = t('Data') . ': ' . t('Remove picture fields');
          $info['ldapdata_sync'] = t('Data') . ': ' . t('Synchronize LDAP data with Drupal profiles');
        }
        if (module_exists('ldapsync')) {
          $info['ldapsync_time_interval'] = t('Synchronization') . ': ' . t('Sync time interval');
          $info['ldapsync_existing_only'] = t('Synchronization') . ': ' . t('Sync existing users only');
          $info['ldapsync_login_conflict'] = t('Synchronization') . ': ' . t('User conflict resolution');
          $info['ldapsync_missing_users_action'] = t('Synchronization') . ': ' . t('Missing users action');
          $info['ldapsync_load_user_by'] = t('Synchronization') . ': ' . t('Existing users test');
          $info['ldapsync_filter'] = t('Synchronization') . ': ' . t('LDAP Sync filter');
          $info['ldapsync_filter_append_default'] = t('Synchronization') . ': ' . t('Append default filter');
        }
        return;
      }
      return array(
        'ldapdata',
        'ldapsync',
      );

    // groups has no global settings
    default:
      return;
  }
}