/[drupal]/contributions/modules/ldap_integration/ldapgroups.module
ViewVC logotype

Contents of /contributions/modules/ldap_integration/ldapgroups.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.40 - (show annotations) (download) (as text)
Tue Aug 25 13:23:37 2009 UTC (3 months ago) by miglius
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-BETA2, HEAD
Changes since 1.39: +3 -319 lines
File MIME type: text/x-php
ldap_integration: separated ldapgroups functions to the new include file for performance, #554026 by johnbarclay
1 <?php
2 // $Id: ldapgroups.module,v 1.39 2009/07/28 14:03:05 miglius Exp $
3
4 /**
5 * @file
6 * ldapgroups integrates ldap groups with drupal roles.
7 */
8
9 //////////////////////////////////////////////////////////////////////////////
10
11 define('LDAPGROUPS_DEFAULT_DN_ATTRIBUTE', 'ou');
12 define('LDAPGROUPS_DEFAULT_ENTRIES_ATTRIBUTE', 'memberUid');
13
14 //////////////////////////////////////////////////////////////////////////////
15 // Core API hooks
16
17 /**
18 * Implementation of hook_menu().
19 */
20 function ldapgroups_menu() {
21 return array(
22 'admin/settings/ldap/ldapgroups' => array(
23 'title' => 'Groups',
24 'description' => 'Configure LDAP groups to Drupal roles mapping settings.',
25 'page callback' => 'drupal_get_form',
26 'page arguments' => array('ldapgroups_admin_settings'),
27 'access arguments' => array('administer ldap modules'),
28 'file' => 'ldapgroups.admin.inc',
29 ),
30 'admin/settings/ldap/ldapgroups/edit' => array(
31 'title' => 'Groups',
32 'page callback' => 'drupal_get_form',
33 'page arguments' => array('ldapgroups_admin_edit', 4, 5),
34 'type' => MENU_CALLBACK,
35 'access arguments' => array('administer ldap modules'),
36 'file' => 'ldapgroups.admin.inc',
37 ),
38 'admin/settings/ldap/ldapgroups/reset' => array(
39 'title' => 'Groups',
40 'page callback' => 'drupal_get_form',
41 'page arguments' => array('ldapgroups_admin_edit', 4, 5),
42 'type' => MENU_CALLBACK,
43 'weight' => 1,
44 'access arguments' => array('administer ldap modules'),
45 'file' => 'ldapgroups.admin.inc',
46 ),
47 );
48 }
49
50 /**
51 * Implements hook_user().
52 */
53 function ldapgroups_user($op, &$edit, &$account, $category = NULL) {
54 switch ($op) {
55 case 'login':
56 require_once(drupal_get_path('module', 'ldapgroups') .'/includes/LDAPInterface.inc');
57 require_once(drupal_get_path('module', 'ldapgroups') .'/ldapgroups.inc');
58 ldapgroups_user_login($account);
59 break;
60 }
61 }
62

  ViewVC Help
Powered by ViewVC 1.1.2