Ignore:
Timestamp:
Oct 7, 2004, 12:48:48 AM (20 years ago)
Author:
z0rglub
Message:
  • checkbox for "remember me" are only shown if authorized
  • simplification : each session is created with a cookie and if PhpWebGallery can't read the cookie, it uses the URI id and it will be used in the add_session_id function.
  • configuration parameter "auth_method" disappeared (didn't lived much...)
  • only one session id size possible. More comments for configuration in include/config.inc.php
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/user.inc.php

    r541 r555  
    4040$user['is_the_guest'] = false;
    4141
    42 // cookie deletion if administrator don't authorize them anymore
    43 if (!$conf['authorize_remembering'] and isset($_COOKIE['id']))
     42if (isset($_COOKIE['id']))
    4443{
    45   setcookie('id', '', 0, cookie_path());
    46   $url = 'category.php';
    47   redirect($url);
     44  $session_id = $_COOKIE['id'];
     45  $user['has_cookie'] = true;
    4846}
    49 
    50 if (isset($_GET['id']))
     47else if (isset($_GET['id']))
    5148{
    5249  $session_id = $_GET['id'];
    5350  $user['has_cookie'] = false;
    54   $session_id_size = $conf['session_id_size_URI'];
    55 }
    56 elseif (isset($_COOKIE['id']))
    57 {
    58   $session_id = $_COOKIE['id'];
    59   $user['has_cookie'] = true;
    60   $session_id_size = $conf['session_id_size_cookie'];
    6151}
    6252else
     
    6656
    6757if (isset($session_id)
    68      and ereg("^[0-9a-zA-Z]{".$session_id_size."}$", $session_id))
     58    and ereg("^[0-9a-zA-Z]{".$conf['session_id_size']."}$", $session_id))
    6959{
    7060  $page['session_id'] = $session_id;
Note: See TracChangeset for help on using the changeset viewer.