"; } else { print "sessions being saved
"; } // print ("Single Sign On Base Url =" . $extra_base_url . "
" ); // WORKS // print ("Single Sign On Master Url =" . $master_url . "
" ); // WORKS // this seems pretty straight forward - if singlesignon prior id is empty // or not the same as current session id then.. // then set a prior session and go off to the main site to check on things. // print ( " DIRECT FROM SESSION SINGLE SIGNON PRIOR ID " . $_SESSION['singlesignon_prior_sid'] ); // this reads our forced cookie into the $_SESSION bit... if (isset($_COOKIE[priorid]) ) { $cookievar= $_COOKIE[priorid]; // print ("before cookied prior id =" . $cookievar . "
" ); $_SESSION['singlesignon_prior_sid'] = $cookievar; } // ORIGINAL GOOFY IF STATEMENT if (empty($_SESSION['singlesignon_prior_sid']) || $_SESSION['singlesignon_prior_sid'] != session_id()) // if the prior_sid is empty of course its not gonna equal the session id no?? // take asway the first part of the OR goody. // THIS IS GETTING CLOSER BUT WANT TO TEST MORE // i think that this bit is an array and needs a // if session id IN $_SESSION[ss_p_sid][] extra bracket. or something i dunno. // php syntax masters maybe a little help?? if ( $_SESSION['singlesignon_prior_sid'] != session_id()) // if ( TRUE ) { // print ("Inside the goofy or statement
"); // print ("before we do anything SesID : " . session_id() . "
"); // print ("before we do anything PriorSes ID: " . $_SESSION['singlesignon_prior_sid'] . "
"); // ok Prior Session Id isnt getting written out right. if ($extra_base_url != $master_url) // this just means if we are on a slave site do this. // User was sent back to slave site and were gonna find out whats going on { // print ("We are on a slave site
"); // WORKS if (!empty($_GET['singlesignon_dest'])) { // User was sent back to a slave site by this module but doesn't have // a session. They clearly don't have cookies enabled. drupal_set_message(t('Cookies are required.'), 'error'); return; } // This is the user's first hit to a slave site. Take note of their // session ID, since that's how we tell if they've been here or not. // Then go to the master site to see if they are logged in over there. $testvar = session_id(); // print ( "Afterwards SESSION ID Var : " . $testvar . "
"); $_SESSION['singlesignon_prior_sid'] = $testvar; // this forces the prior id into a cookie - somehow sessions deal doesnt appear to work right // maybe its storing an array .. but whatever. this works when caught before the if statement setcookie ("priorid",$testvar); $cookievar= $_COOKIE[priorid]; // print ("afterwards cookied prior id =" . $cookievar . "
" ); // $_SESSION['singlesignon_prior_sid'] = session_id(); // replace this out to make sure is working _singlesignon_goto_url($master_url, 'singlesignon/initial_check'); // this part appears to work . sends off to master url all happy, // but comes back and loops forever. worked before. // issue has to be in the logic above ( i hope ) } } // end goofy or statement