Index: volunteer.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/volunteer/volunteer.module,v
retrieving revision 1.48
diff -u -F^f -r1.48 volunteer.module
--- volunteer.module	29 Nov 2005 23:04:21 -0000	1.48
+++ volunteer.module	1 Dec 2005 22:12:17 -0000
@@ -75,24 +75,26 @@ function volunteer_settings() {
     $ufGroups = crm_uf_get_profile_groups();
     db_set_active();
     if (is_array($ufGroups) && count($ufGroups)) {
+      $correct_email_exists = FALSE;
+      $email_exists = FALSE;
       foreach ($ufGroups as $id => $title) {
         $profile = crm_uf_get_profile_fields($id, TRUE);
-        $has_email = FALSE;
-        $correct_email = FALSE;
+        $has_correct_email = FALSE;
         foreach($profile as $field) {
           if ($field['name'] == 'email') {
-            $has_email = TRUE;
+            $email_exists = TRUE;
             if ($field['is_required'] == 1 && $field['is_match'] == 1) {
-              $correct_email = TRUE;
+              $has_correct_email = TRUE;
+              $correct_email_exists = TRUE;
             }
           }
         }
-        if ($has_email) {
+        if ($has_correct_email) {
           $forms[$id] = $title;
         }
       }
-      if ($has_email) {
-        if ($correct_email) {
+      if ($email_exists) {
+        if ($correct_email_exists) {
           $group_form .= form_select(t('CiviCRM profile form for volunteers'), 'volunteer_form', variable_get('volunteer_form', ''), $forms, t('Select a CiviCRM Profile form for volunteers. Users will fill out required fields in this form when volunteering for an event. You can <a href="%url">add</a> a volunteer specific profile. The profile needs at least an email field and it needs to be set to "Required", "Display in Registration Form", "Key to Match Contacts", and "Active".', array('%url' => url('civicrm/admin/uf/group'))), 0, FALSE, TRUE);
         }
         else {
