diff --git a/ldapdata.module b/ldapdata.module
index 0f6fa7d..c0f13a8 100644
--- a/ldapdata.module
+++ b/ldapdata.module
@@ -237,6 +237,7 @@ function _ldapdata_user_load(&$account, $sync = FALSE, $newentry = NULL) {
 
     // Retrieve profile fields list.
     $content_profile_fields = _ldapdata_retrieve_content_profile_fields();
+    $profile_fields = _ldapdata_retrieve_profile_fields();
 
     // Determine which profile fields are dates
     $placeholders = implode(',', array_fill(0, count($profile_fields), "'%s'"));
