aboutsummaryrefslogtreecommitdiffstats
path: root/include/user.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-12-01 01:46:32 +0000
committerrvelices <rv-github@modusoptimus.com>2006-12-01 01:46:32 +0000
commitb2de3c32ee635788f2f34c98d529fdc167ca6a51 (patch)
tree8ab638b5c8d705a012686fadd9fca492029bb661 /include/user.inc.php
parent7111d867b9e85b8656563f3febafae1d8d365435 (diff)
- sessions are always started (even for visitors)
- thumbnail order saved in the session instead of cookie git-svn-id: http://piwigo.org/svn/trunk@1623 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/user.inc.php')
-rw-r--r--include/user.inc.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/include/user.inc.php b/include/user.inc.php
index f5c77b2f8..103052ad2 100644
--- a/include/user.inc.php
+++ b/include/user.inc.php
@@ -43,26 +43,22 @@ if (isset($_COOKIE[session_name()]))
setcookie($conf['remember_me_name'], '', 0, cookie_path());
redirect(make_index_url());
}
- elseif (empty($_SESSION['pwg_uid']))
- { // timeout
- setcookie(session_name(),'',0,
- ini_get('session.cookie_path'),
- ini_get('session.cookie_domain')
- );
- }
- else
+ elseif (!empty($_SESSION['pwg_uid']))
{
$user['id'] = $_SESSION['pwg_uid'];
}
}
-
// Now check the auto-login
if ( $user['id']==$conf['guest_id'] )
{
auto_login();
}
+if (session_id()=="")
+{
+ session_start();
+}
// using Apache authentication override the above user search
if ($conf['apache_authentication'] and isset($_SERVER['REMOTE_USER']))