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/identification.php

    r541 r555  
    4343  if ($row['password'] == md5($_POST['password']))
    4444  {
    45     if ($conf['auth_method'] == 'cookie'
    46         or isset($_POST['remember_me']) and $_POST['remember_me'] == 1)
     45    $session_length = $conf['session_length'];
     46    if ($conf['authorize_remembering']
     47        and isset($_POST['remember_me'])
     48        and $_POST['remember_me'] == 1)
    4749    {
    48       if ($conf['auth_method'] == 'cookie')
    49       {
    50         $cookie_length = $conf['session_length'];
    51       }
    52       else if ($_POST['remember_me'] == 1)
    53       {
    54         $cookie_length = $conf['remember_me_length'];
    55       }
    56       session_create($row['id'],
    57                      'cookie',
    58                      $cookie_length);
    59       redirect('category.php');
     50      $session_length = $conf['remember_me_length'];
    6051    }
    61     else if ($conf['auth_method'] == 'URI')
    62     {
    63       $session_id = session_create($row['id'],
    64                                    'URI',
    65                                    $conf['session_length']);
    66       redirect('category.php?id='.$session_id);
    67     }
     52    $session_id = session_create($row['id'], $session_length);
     53    redirect('category.php?id='.$session_id);
    6854  }
    6955  else
     
    9884    'F_LOGIN_ACTION' => add_session_id('identification.php')
    9985    ));
     86
     87if ($conf['authorize_remembering'])
     88{
     89  $template->assign_block_vars('remember_me',array());
     90}
    10091//-------------------------------------------------------------- errors display
    10192if ( sizeof( $errors ) != 0 )
Note: See TracChangeset for help on using the changeset viewer.