Changeset 159

Show
Ignore:
Timestamp:
05/05/06 00:48:24 (3 years ago)
Author:
laurentj
Message:

bug sur la gestion du timeout dans le plugin auth

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix-modules/auth/plugins/auth/auth.plugin.php

    r150 r159  
    5555        } 
    5656        if(!$notLogged && $this->config['timeout']){ 
    57             if(!isset($_SESSION['JELIX_AUTH_LASTTIME']) 
    58             || (mktime() - $_SESSION['JELIX_AUTH_LASTTIME'] )> ($this->config['timeout'] *60)){ 
    59                 $notLogged = true; 
    60                 jAuth::logout(); 
     57            if(isset($_SESSION['JELIX_AUTH_LASTTIME'])){ 
     58                if((mktime() - $_SESSION['JELIX_AUTH_LASTTIME'] )> ($this->config['timeout'] *60)){ 
     59                    $notLogged = true; 
     60                    jAuth::logout(); 
     61                    unset($_SESSION['JELIX_AUTH_LASTTIME']); 
     62                }else{ 
     63                    $_SESSION['JELIX_AUTH_LASTTIME'] =mktime(); 
     64                } 
    6165            }else{ 
    6266                $_SESSION['JELIX_AUTH_LASTTIME'] =mktime(); 
Download in other formats: Unified Diff Zip Archive