You are here

simple_ldap.module in Simple LDAP 7

Same filename and directory in other branches
  1. 7.2 simple_ldap.module

Main simple_ldap module file.

File

simple_ldap.module
View source
<?php

/**
 * @file
 * Main simple_ldap module file.
 */

/**
 * Implements hook_menu().
 */
function simple_ldap_menu() {
  $items = array();
  $items['admin/config/people/simple_ldap'] = array(
    'title' => 'Simple LDAP Configuration',
    'description' => 'LDAP server, authentication parameters, roles, provisioning, etc.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_ldap_admin',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'simple_ldap.admin.inc',
  );
  $items['admin/config/people/simple_ldap/server'] = array(
    'title' => 'Server',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  return $items;
}

/**
 * Returns whether simple_ldap has been configured.
 */
function simple_ldap_configured() {
  $configured = TRUE;

  // Check each of the required configuration items.
  $configured = $configured && variable_get('simple_ldap_host') !== NULL;
  $configured = $configured && variable_get('simple_ldap_port') !== NULL;
  return $configured;
}

Functions

Namesort descending Description
simple_ldap_configured Returns whether simple_ldap has been configured.
simple_ldap_menu Implements hook_menu().