? 1014702-insert_token_correction.patch
? 1043640-Fix-SSO-for-6.x-3.x-dev.patch
? 1049398-cas-6.x-3.x-warnings.patch
? 859100-saml-1.patch
? 998316-2.patch
? cas-85794-10.patch
? cas-85794-9.patch
? cas-889404-6.2.patch
? cas-889404.patch
? cas-903806.patch
? cas_attributes-3.patch
? cas_server_956108.patch
? cas_verify_removal.patch
Index: cas.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cas/cas.module,v
retrieving revision 1.74.2.14
diff -u -r1.74.2.14 cas.module
--- cas.module	10 Feb 2011 16:01:08 -0000	1.74.2.14
+++ cas.module	11 Feb 2011 21:43:05 -0000
@@ -42,6 +42,7 @@
   }
 }
 
+
 /**
  * Invokes hook_auth_filter() in every module.
  *
@@ -1204,44 +1205,43 @@
   switch ($form_id) {
     case 'user_login':    
     case 'user_login_block':
-      if (variable_get('cas_login_form', CAS_NO_LINK) == CAS_NO_LINK) {
-        break;
-      }
-      drupal_add_css(drupal_get_path('module', 'cas') .'/cas.css', 'module');
-      drupal_add_js(drupal_get_path('module', 'cas') .'/cas.js');
-      if ($form_state['post']['cas_identifier'] == 1) {
-        $form['name']['#required'] = FALSE;
-        $form['pass']['#required'] = FALSE;
-        unset($form['#submit']);
-        $form['#validate'] = array('cas_login_validate');
+      if (variable_get('cas_login_form', CAS_ADD_LINK) == CAS_ADD_LINK || variable_get('cas_login_form', CAS_MAKE_DEFAULT) == CAS_MAKE_DEFAULT) {
+        drupal_add_css(drupal_get_path('module', 'cas') .'/cas.css', 'module');
+        drupal_add_js(drupal_get_path('module', 'cas') .'/cas.js');
+        if ($form_state['post']['cas_identifier'] == 1) {
+          $form['name']['#required'] = FALSE;
+          $form['pass']['#required'] = FALSE;
+          unset($form['#submit']);
+          $form['#validate'] = array('cas_login_validate');
+        }
+  
+        $items = array();
+        $items[] = array(
+          'data' => l(t(variable_get('cas_login_invite', CAS_LOGIN_INVITE_DEFAULT)), '', array('fragment' => ' ', 'external' => TRUE)),
+          'class' => 'cas-link',
+        );
+        
+        $items[] = array(
+          'data' => l(t(variable_get('cas_login_drupal_invite', CAS_LOGIN_DRUPAL_INVITE_DEFAULT)), '', array('fragment' => ' ', 'external' => TRUE)), 
+          'class' => 'uncas-link',
+        );
+        
+        $form['cas_links'] = array(
+          '#value' => theme('item_list', $items),
+          '#weight' => 1,
+        );
+  
+        $form['links']['#weight'] = 2;
+  
+        $form['cas_identifier'] = array(
+          '#type' => 'checkbox',
+          '#title' => t('Log in using NetID'),
+          '#default_value' => (variable_get('cas_login_form', CAS_NO_LINK) == CAS_ADD_LINK ? 0 : 1),
+          '#weight' => -1,
+          '#description' => t(variable_get('cas_login_redir_message', CAS_LOGIN_REDIR_MESSAGE)),
+        );
+        $form['cas.return_to'] = array('#type' => 'hidden', '#value' => 'cas');
       }
-
-      $items = array();
-      $items[] = array(
-        'data' => l(t(variable_get('cas_login_invite', CAS_LOGIN_INVITE_DEFAULT)), '', array('fragment' => ' ', 'external' => TRUE)),
-        'class' => 'cas-link',
-      );
-      
-      $items[] = array(
-        'data' => l(t(variable_get('cas_login_drupal_invite', CAS_LOGIN_DRUPAL_INVITE_DEFAULT)), '', array('fragment' => ' ', 'external' => TRUE)), 
-        'class' => 'uncas-link',
-      );
-      
-      $form['cas_links'] = array(
-        '#value' => theme('item_list', $items),
-        '#weight' => 1,
-      );
-
-      $form['links']['#weight'] = 2;
-
-      $form['cas_identifier'] = array(
-        '#type' => 'checkbox',
-        '#title' => t('Log in using NetID'),
-        '#default_value' => (variable_get('cas_login_form', CAS_NO_LINK) == CAS_ADD_LINK ? 0 : 1),
-        '#weight' => -1,
-        '#description' => t(variable_get('cas_login_redir_message', CAS_LOGIN_REDIR_MESSAGE)),
-      );
-      $form['cas.return_to'] = array('#type' => 'hidden', '#value' => 'cas');
       break;
 
     
