From a93e28caf774204cdf02e9422b3dc698cce892d7 Mon Sep 17 00:00:00 2001
From: Bradley M. Froehle <brad.froehle@gmail.com>
Date: Mon, 7 Mar 2011 10:36:53 -0800
Subject: [PATCH] Issue #869926 - CAS auto login not working between 2 drupal sites.

---
 cas.module |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/cas.module b/cas.module
index e72d2f9..1903cc5 100644
--- a/cas.module
+++ b/cas.module
@@ -201,6 +201,9 @@ function cas_login_check() {
 
     // final check to make sure we have a good user
     if (!empty($account) && $account->uid > 0) {
+      // Delete the login checked cookie, since we've successfully logged in.
+      setcookie('cas_login_checked', '', time()-3600);
+
       // Save single sign out information
       if (!empty($_SESSION['cas_ticket']) && variable_get('cas_signout', FALSE)) {
         _cas_single_sign_out_save_token($account);
-- 
1.7.3.5

