diff -r 3cf2f7d22d2e ldapdata.admin.inc
--- a/ldapdata.admin.inc	Fri Feb 25 02:06:19 2011 +0000
+++ b/ldapdata.admin.inc	Mon Mar 07 10:02:33 2011 +0000
@@ -190,7 +190,7 @@
       '#default_value' => $attributes,
       '#cols' => 25,
       '#rows' => 5,
-      '#description' => t('A list of the LDAP attributes and corresponding form data. If configured, they will be listed in a table below for a more control. The element type may be \'text\' or \'url\', the form element should be \'textfield\'. Please look at the following examples:<br /><code>cn|text|textfield|Common Name|64|64</code><br /><code>homePage|url|textfield|Other web pages|64|64</code>'),
+      '#description' => t('A list of the LDAP attributes and corresponding form data. If configured, they will be listed in a table below for a more control. The element type may be \'text\' or \'url\', the form element should be \'textfield\' for single-value or \'textarea\' for multi-value attributes. Please look at the following examples:<br /><code>cn|text|textfield|Common Name|64|64</code><br /><code>homePage|url|textfield|Other web pages|64|64</code><br /><code>mailLocalAddress|text|textarea|available E-Mail Addresses|64|64</code><br />'),
     );
     $fields = $rooptions = $rwoptions = $roattrs = $rwattrs = array();
     foreach ($ldapdata_attrs as $attr => $data) {
diff -r 3cf2f7d22d2e ldapdata.module
--- a/ldapdata.module	Fri Feb 25 02:06:19 2011 +0000
+++ b/ldapdata.module	Mon Mar 07 10:02:33 2011 +0000
@@ -172,6 +172,8 @@
     if (in_array($attr_name, $attributes)) {
       array_shift($attr_info);
       $value = isset($entry[drupal_strtolower($attr_name)]) ? $entry[drupal_strtolower($attr_name)][0] : '';
+      // check attribute if textarea
+      if ($attr_info[0] == 'textarea')  $value=implode("\n", array_slice($entry[drupal_strtolower($attr_name)],1))  ;
       $form['ldap_attributes']['ldap_'. $attr_name] = _ldapdata_attribute_form($value, $attr_info);
     }
   }
@@ -330,7 +332,16 @@
   $items = array();
   $i = 0;
   foreach (_ldapdata_ldap_info($user, 'ldapdata_attrs') as $attr_name => $attr_info) {
+    // devel helper
+    dpm(array($attr_name, $attr_info, $entry[drupal_strtolower($attr_name)][0], $attr_info[0]));
     if (in_array($attr_name, $allowed_attrs)) {
+      // check attribute if textarea
+      if ($attr_info[1]=='textarea' && is_array($entry[drupal_strtolower($attr_name)]) ) {
+        dpm($entry[drupal_strtolower($attr_name)]);
+        // simply implode by '|'
+        // maybe it is better to output as <li>?
+        $entry[drupal_strtolower($attr_name)][0]=implode(" | ", array_slice($entry[drupal_strtolower($attr_name)], 1));
+      }
       $item = array(
         '#type' => 'user_profile_item',
         '#title' => t($attr_info[2]),
@@ -367,12 +378,29 @@
 function _ldapdata_user_update_ldap_attributes(&$edit, &$user) {
   $writeout = array();
   $editables = _ldapdata_ldap_info($user, 'ldapdata_rwattrs');
+  // load attributes config, will be compared below
+  $attributes_config = _ldapdata_ldap_info($user, 'ldapdata_attrs');
 
   foreach ($edit as $edit_attr => $value) {
     // Preventing a POST data injection: we check allowance to write value.
     if (($ldap_attr = preg_replace('/^ldap_(.*)$/', '$1', $edit_attr)) && in_array($ldap_attr, $editables))
+      // check attribute if textarea and explode textarea to array
+      if ($attributes_config[$ldap_attr][1] == 'textarea') {
+        // each newline to array
+        $textarea_array = array();
+        $textarea_array = explode("\n", $value);
+        // trim each value, prevent store as base64
+        foreach ($textarea_array as &$textarea_value) {
+          // $textarea_array[$i]=trim($textarea_array[$i]);
+          $textarea_value=trim($textarea_value);
+        }
+        unset($textarea_value);
+        $writeout[$ldap_attr] = $textarea_array;
+      }
+    else { 
       $writeout[$ldap_attr] = $value;
       unset($edit[$edit_attr]);
+     }
   }
 
   return $writeout;
@@ -468,6 +496,18 @@
         '#required' => array_shift($info),
       );
       break;
+    case 'textarea':
+      $form = array(
+        '#type' => 'textarea',
+        '#title' => array_shift($info),
+        '#default_value' => $value,
+        '#description' => array_shift($info),
+        '#cols' => array_shift($info),
+        '#rows' => 5,
+        '#attributes' => array_shift($info),
+        '#required' => array_shift($info),
+      );
+      break;
     case 'password':
       $form = array(
         '#type' => 'password',
