Index: ldapdata.module
===================================================================
--- ldapdata.module	(revision 265)
+++ ldapdata.module	(working copy)
@@ -8,8 +8,6 @@
 
 // Private constants. Do not touch
 define(LDAP_SETTINGS_GROUP_STRING, t('LDAP attributes'));
-define(LDAP_USER_DATA_EDIT_TAB, t('LDAP entry'));
-define(LDAP_CATEGORY_USER_DATA, 'ldap_user_data');
 define(LDAP_MAP_ATTRIBUTES, 0);
 define(LDAP_MAP_ATTRIBUTES_READ_ONLY, 3);
 //define(LDAP_MAP_ONLY_LOST_PASSWORDS, 1);
@@ -54,8 +52,6 @@
 
 function ldapdata_user($op, &$edit, &$account, $category = NULL) {
   switch($op) {
-    case 'categories':
-      return ldapdata_user_categories();
     case 'form':
       return ldapdata_user_form($account, $category);
     case 'load':
@@ -193,29 +189,12 @@
   return $form;
 }
 
-function ldapdata_user_categories() {
-  global $user;
-
-  $ret = null;
-
-  if ($user->ldap_authentified
-   && variable_get('ldap_attr_mapping', LDAP_MAP_NOTHING) == LDAP_MAP_ATTRIBUTES
-   && variable_get('ldap_useredit_attributes', array())
-   && (arg(2) != 'edit' || $_SESSION['ldap_login'])) {
-
-    $ret = array(array('name' => LDAP_CATEGORY_USER_DATA, 'title' => t(LDAP_USER_DATA_EDIT_TAB), 'weight' => 10));
-  }
-
-  return $ret;
-}
-
 function ldapdata_user_form($account, $category) {
   global $ldap_attributes, $ldap;
 
   $attributes = variable_get('ldap_useredit_attributes', array());
   if (!$user->ldap_authentified
    || variable_get('ldap_attr_mapping', LDAP_MAP_NOTHING) != LDAP_MAP_ATTRIBUTES
-   || $category != LDAP_CATEGORY_USER_DATA
    || ! $attributes
    || ! isset($_SESSION['ldap_login'])) {
     return null;
@@ -354,24 +333,19 @@
     return;
   }
 
-  // Three cases here:
-  //   1. User logged on and editing his LDAP entry attributes ($category == LDAP_CATEGORY_USER_DATA).
-  //   2. User logged on and editing his Drupal account settings ($category == 'account').
-  //   3. Password lost and being updated (category == 'account').
+  // Two cases here:
+  //   1. User logged on and editing his Drupal account settings ($category == 'account').
+  //   2. Password lost and being updated (category == 'account').
   // Additionally:
-  //   4. User logged on and editing his profile.module fields ($category == *any*).
+  //   3. User logged on and editing his profile.module fields ($category == *any*).
   $writeout = array();
 
-  // So, case 1
-  if ($category == LDAP_CATEGORY_USER_DATA && variable_get('ldap_useredit_attributes', array())) {
-    $writeout = array_merge($writeout, ldapdata_user_update_ldap_attributes($edit, $user));
-  }
-  // Cases 2 && 3
-  else if ($category == 'account') {
+  // Cases 1 && 2
+  if ($category == 'account') {
     $writeout = array_merge($writeout, ldapdata_user_update_drupal_account($edit, $user));
   }
 
-  // And now, case 4
+  // And now, case 3
   $writeout = array_merge($writeout, ldapdata_user_update_profile($edit, $user));
 
   if ($writeout) {
