summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile_data_translate.inc
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile_data_translate.inc')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile_data_translate.inc24
1 files changed, 24 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile_data_translate.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile_data_translate.inc
new file mode 100644
index 0000000..7cabb4f
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile_data_translate.inc
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @file
+ * translate file for ldap_profile module
+ */
+
+/**
+ * Modify this file to indicate any types of custom data translations that you need.
+ */
+function ldap_profile_custom_translate($field, $value) {
+ $result = '';
+ switch ($field) {
+ /**
+ * the following is an example of how this is used
+ * if your ldap account has an ldap field of telephone_number with format '(xxx) xxx-xxx'
+ * and your drupal account has field_phone with format 'xxx-xxx-xxxx'
+ *
+ * case 'telephone_number': $result = strtr($value, array('(' => '', ')' => '', ' ' => '-'));
+ */
+ default: $result = $value;
+ }
+ return $result;
+}