/[drupal]/contributions/modules/ldap_lookup/ldap_lookup.install
ViewVC logotype

Contents of /contributions/modules/ldap_lookup/ldap_lookup.install

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


Revision 1.3 - (show annotations) (download) (as text)
Thu Oct 4 09:53:26 2007 UTC (2 years, 1 month ago) by kibble
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -1 lines
File MIME type: text/x-php
Removed blank lines at end of files causing header already sent warning...
1 <?php
2 //$Id: ldap_lookup.install,v 1.2 2007/09/26 09:57:27 kibble Exp $
3 /**
4 * Implementation of hook_install().
5 */
6 function ldap_lookup_install() {
7 switch ($GLOBALS['db_type']) {
8 case 'mysql':
9 case 'mysqli':
10 db_query("CREATE TABLE {ldap_lookup} (
11 sid int NOT NULL auto_increment,
12 name varchar(255) NOT NULL default '',
13 status int NOT NULL default '0',
14 server varchar(255) NOT NULL default '',
15 port int(10) NOT NULL default '389',
16 tls int NOT NULL default '0',
17 basedn varchar(255) NOT NULL default '',
18 groupdn varchar(255) NOT NULL default '',
19 user_attr varchar(255) NOT NULL default '',
20 email_attr varchar(255) NOT NULL default '',
21 binddn varchar(255) NOT NULL default '',
22 bindpw varchar(255) NOT NULL default '',
23 PRIMARY KEY (name),
24 KEY sid (sid)
25 ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
26
27 db_query("CREATE TABLE {ldap_lookup_associate} (
28 id int(10) unsigned NOT NULL auto_increment,
29 rid int(10) unsigned NOT NULL,
30 group_name varchar(255) NOT NULL,
31 PRIMARY KEY (id),
32 UNIQUE KEY id (id)
33 ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
34
35 break;
36 }
37 }
38
39 /**
40 * Implementation of hook_uninstall().
41 */
42 function ldap_lookup_uninstall() {
43 db_query('DROP TABLE {ldap_lookup}');
44 db_query('DROP TABLE {ldap_lookup_assoicate}');
45 }
46
47 ?>

  ViewVC Help
Powered by ViewVC 1.1.2