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/functions_session.inc.php

    r541 r555  
    6363 *
    6464 * @param int userid
    65  * @param string method : cookie or URI
    6665 * @param int session_lentgh : in seconds
    6766 * @return string
    6867 */
    69 function session_create($userid, $method, $session_length)
     68function session_create($userid, $session_length)
    7069{
    7170  global $conf;
     
    7574  while (!$id_found)
    7675  {
    77     $generated_id = generate_key($conf['session_id_size_'.$method]);
     76    $generated_id = generate_key($conf['session_id_size']);
    7877    $query = '
    7978SELECT id
     
    9897  mysql_query($query);
    9998
    100   if ($method == 'cookie')
    101   {
    102     setcookie('id', $generated_id, $session_length+time(), cookie_path());
    103   }
     99  setcookie('id', $generated_id, $expiration, cookie_path());
    104100               
    105101  return $generated_id;
Note: See TracChangeset for help on using the changeset viewer.