summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Palmer <nick@sluggardy.net>2008-10-19 10:31:00 +0000
committerNick Palmer <nick@sluggardy.net>2008-10-19 10:31:00 +0000
commitc95f3e24f605b036bc52cf92ed7f9f3bd34eb080 (patch)
tree1942a442d39ceda067a71bb20a61fb813a965859
parent9a5fbdb5153986270bd4ed36b38dcc404701f40a (diff)
downloadusers-c95f3e24f605b036bc52cf92ed7f9f3bd34eb080.tar.gz
users-c95f3e24f605b036bc52cf92ed7f9f3bd34eb080.tar.bz2
users-c95f3e24f605b036bc52cf92ed7f9f3bd34eb080.zip
Fix for some very strange "firewall" software that limits cookies in odd ways.pre_update_permission
-rw-r--r--bit_setup_inc.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/bit_setup_inc.php b/bit_setup_inc.php
index c4fa1f9..0df8156 100644
--- a/bit_setup_inc.php
+++ b/bit_setup_inc.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_users/bit_setup_inc.php,v 1.48 2008/10/16 09:57:58 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_users/bit_setup_inc.php,v 1.49 2008/10/19 10:31:00 nickpalmer Exp $
* @package users
*/
global $gBitDbType, $gBitDbHost, $gBitDbUser, $gBitDbPassword, $gBitDbName, $gBitThemes;
@@ -104,7 +104,13 @@ if( !empty( $gOverrideLoginFunction )) {
} else {
$cookie_time = 0;
}
+
setcookie( $user_cookie_site, session_id(), $cookie_time, $gBitSystem->getConfig( 'cookie_path', BIT_ROOT_URL ), $gBitSystem->getConfig( 'cookie_domain', '' ));
+ // Some firewall software blocks cookies sent the above way so try this
+ // way if that failed.
+ if (empty($_COOKIE[$user_cookie_site])) {
+ $_COOKIE[$user_cookie_site] = session_id();
+ }
// if the auth method is 'web site', look for the username in $_SERVER
if( $gBitSystem->getConfig( 'users_auth_method', 'tiki' ) == 'ws' ) {