--- ldapsync_orig.module	2010-03-25 07:00:16.000000000 -0400
+++ ldapsync.module	2010-07-06 15:38:21.574282900 -0400
@@ -74,6 +74,11 @@
     include_once(drupal_get_path('module', 'ldapauth') .'/ldapgroups.inc');
   }
 
+  // If ldapdata is enabled, include it for ldapdata sync.
+  if (module_exists('ldapdata')) {
+    include_once(drupal_get_path('module', 'ldapauth') .'/ldapdata.module');
+  }
+
   // Find all users in specified OU (using base DN and bind information from ldapauth).
   $ldap_users = _ldapsync_search();
 
@@ -130,6 +135,11 @@
     if (function_exists('ldapgroups_user_login')) {
       ldapgroups_user_login($account);
     }
+
+    // Update user's data if ldapdata is enabled.
+    if (function_exists('_ldapdata_user_load')) {
+      _ldapdata_user_load($account, TRUE);
+    }
     
     // Enable any blocked user who is enabled in LDAP.
     if (!$account->status) {
