aboutsummaryrefslogtreecommitdiffstats
path: root/include/user.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/user.inc.php')
-rw-r--r--include/user.inc.php20
1 files changed, 5 insertions, 15 deletions
diff --git a/include/user.inc.php b/include/user.inc.php
index 01a7243d1..a39441bb2 100644
--- a/include/user.inc.php
+++ b/include/user.inc.php
@@ -39,25 +39,15 @@ $query_user = 'SELECT * FROM '.USERS_TABLE;
$query_done = false;
$user['is_the_guest'] = false;
-// cookie deletion if administrator don't authorize them anymore
-if (!$conf['authorize_remembering'] and isset($_COOKIE['id']))
+if (isset($_COOKIE['id']))
{
- setcookie('id', '', 0, cookie_path());
- $url = 'category.php';
- redirect($url);
+ $session_id = $_COOKIE['id'];
+ $user['has_cookie'] = true;
}
-
-if (isset($_GET['id']))
+else if (isset($_GET['id']))
{
$session_id = $_GET['id'];
$user['has_cookie'] = false;
- $session_id_size = $conf['session_id_size_URI'];
-}
-elseif (isset($_COOKIE['id']))
-{
- $session_id = $_COOKIE['id'];
- $user['has_cookie'] = true;
- $session_id_size = $conf['session_id_size_cookie'];
}
else
{
@@ -65,7 +55,7 @@ else
}
if (isset($session_id)
- and ereg("^[0-9a-zA-Z]{".$session_id_size."}$", $session_id))
+ and ereg("^[0-9a-zA-Z]{".$conf['session_id_size']."}$", $session_id))
{
$page['session_id'] = $session_id;
$query = '