Need to increase length of field for OU Base DN

jlea9378 - September 8, 2009 - 18:21
Project:LDAP Directory
Version:6.x-0.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I'm trying to display Organizational Units for searching, but the last letter of my Base DN keeps getting cut off. Apparently the field is limited to 50chars but my base DN is about 52 chars long, so it gets cut off. Can we get the size limitation increased in the next version? I tried just changing the text box max size in the module's php file but it didn't solve the problem. It must store it in the DB as being 50 chars long also.

#1

markDrupal - November 13, 2009 - 18:58

You'd have to change the database schema.

Either, disable & uninstall this module then change the ldapdirectory.install file. Or go into mysql and alter your table. Here is what you'd need to change if you edit the .install file. Change the 50s to 60, or 128. whatever, it is sort of a minor change (increasing your database by 10bytes or so??): After making the changes be sure to reinstall.

<?php
     
'ou_label' => array(
       
'type' => 'varchar',
       
'length' => 50,
       
'description' => t('Organizational Unit label.'),
      ),
     
'ou_attribute' => array(
       
'type' => 'varchar',
       
'length' => 50,
       
'description' => t('Organizational Unit attribute.'),
      ),
     
'ou_userlink' => array(
       
'type' => 'varchar',
       
'length' => 50,
       
'description' => t('Organizational Unit userlink.'),
      ),
     
'ou_dn' => array(
       
'type' => 'varchar',
       
'length' => 50,
       
'description' => t('Organizational Unit dn.'),
      ),
?>

 
 

Drupal is a registered trademark of Dries Buytaert.