From ed8cd01d0da4140a5c79bf5b9956eacd2d7ec35a Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Sat, 13 Oct 2012 18:46:28 -0500
Subject: [PATCH] Creating a branch I can use to disable logins for the
 hosting.com to Dell migration.

---
 sites/all/modules/unl/unl_cas/unl_cas.module | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sites/all/modules/unl/unl_cas/unl_cas.module b/sites/all/modules/unl/unl_cas/unl_cas.module
index 0ee00868..da65cb45 100644
--- a/sites/all/modules/unl/unl_cas/unl_cas.module
+++ b/sites/all/modules/unl/unl_cas/unl_cas.module
@@ -13,6 +13,9 @@ function unl_cas_enable() {
  * Implements hook_init().
  */
 function unl_cas_init() {
+  $GLOBALS['user'] = drupal_anonymous_user();
+  return;
+
   // If no one is claiming to be logged in while no one is actually logged in, we don't need CAS.
   if (!array_key_exists('unl_sso', $_COOKIE) && user_is_anonymous()) {
     return;
@@ -139,6 +142,9 @@ function unl_cas_validate_ticket() {
  */
 function unl_cas_form_alter(&$form, &$form_state, $form_id) {
   if ($form_id == 'user_login') {
+    drupal_set_message('Logins have been disabled while we migrate to our new host.', 'error');
+    $form = array('#parents' => array());
+    return;
     $cas = unl_cas_get_adapter();
     unset($_GET['destination']);
     drupal_goto($cas->getLoginUrl());
-- 
GitLab