Index: user_terms.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/user_terms/user_terms.module,v
retrieving revision 1.1.2.19
diff -u -p -r1.1.2.19 user_terms.module
--- user_terms.module	5 Mar 2010 19:31:02 -0000	1.1.2.19
+++ user_terms.module	16 Mar 2010 16:07:19 -0000
@@ -224,47 +224,49 @@ function user_terms_view_profile_item(&$
  *   The account from which data is loaded and displayed.
  */
 function user_terms_form_profile($edit, $account, $category, $register = FALSE) {
-  $form  = array();
-  $vids = variable_get('user_terms_vocabs', '');
-
-  // Skip everything if no user term vocabulary is selected.
-  if (!empty($vids)) {
-    $default = NULL;
-    if (!$register) {
-      $user = user_load(array('uid' =>  $account->uid));
-      $default = empty($user->user_terms) ? array() : array_keys($user->user_terms);
-    }
-
-    $form['user_terms'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('User terms'),
-    );
+  if (!variable_get('user_terms_override_selector', FALSE)) {
+    $form  = array();
+    $vids = variable_get('user_terms_vocabs', '');
+
+    // Skip everything if no user term vocabulary is selected.
+    if (!empty($vids)) {
+      $default = NULL;
+      if (!$register) {
+        $user = user_load(array('uid' =>  $account->uid));
+        $default = empty($user->user_terms) ? array() : array_keys($user->user_terms);
+      }
 
-    foreach ($vids as $vid)  {
-      // Use taxonomy module's form element builder function.
-      $vocabulary = taxonomy_vocabulary_load($vid);
-      
-      $default_terms = array();
-      if (isset($account->user_terms)) {
-        foreach ($account->user_terms as $term) {
-          // Free tagging has no default terms and also no vid after preview.
-          if (isset($term['vid']) && $term['vid'] == $vid) {
-            $default_terms[$term['tid']] = $term;
+      $form['user_terms'] = array(
+        '#type' => 'fieldset',
+        '#title' => t('User terms'),
+      );
+
+      foreach ($vids as $vid)  {
+        // Use taxonomy module's form element builder function.
+        $vocabulary = taxonomy_vocabulary_load($vid);
+
+        $default_terms = array();
+        if (isset($account->user_terms)) {
+          foreach ($account->user_terms as $term) {
+            // Free tagging has no default terms and also no vid after preview.
+            if (isset($term['vid']) && $term['vid'] == $vid) {
+              $default_terms[$term['tid']] = $term;
+            }
           }
         }
-      }
-      $form['user_terms']['user_terms_' . $vid]  = taxonomy_form($vid, array_keys($default_terms), NULL, 'taxonomy');
-      $form['user_terms']['user_terms_' . $vid]['#weight'] = $vocabulary->weight;
-      $form['user_terms']['user_terms_' . $vid]['#required'] = $vocabulary->required;
-      // Tag vocabularies don't have their 'multiple' properly explicitly set,
-      // so taxonomy_form() doesn't make the form element multiple-select.
-      if ($vocabulary->tags) {
-        $form['user_terms']['user_terms_' . $vid]['#multiple'] = TRUE;
+        $form['user_terms']['user_terms_' . $vid]  = taxonomy_form($vid, array_keys($default_terms), NULL, 'taxonomy');
+        $form['user_terms']['user_terms_' . $vid]['#weight'] = $vocabulary->weight;
+        $form['user_terms']['user_terms_' . $vid]['#required'] = $vocabulary->required;
+        // Tag vocabularies don't have their 'multiple' properly explicitly set,
+        // so taxonomy_form() doesn't make the form element multiple-select.
+        if ($vocabulary->tags) {
+          $form['user_terms']['user_terms_' . $vid]['#multiple'] = TRUE;
+        }
       }
     }
-  }
 
-  return $form;
+    return $form;
+  }
 }
 

