Changeset 597 for trunk/phpgwapi


Ignore:
Timestamp:
01/13/09 18:22:43 (15 years ago)
Author:
niltonneto
Message:

Resolve #371

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.sessions.inc.php

    r548 r597  
    519519                                return False; 
    520520                        } 
    521  
    522                         if($this->account_id!=null) { 
    523                                 $last_access = $this->get_last_access_on_history($this->account_id); 
    524                                 //echo $last_access+($current_config["time_to_account_expires"]*86400); 
    525                                 //exit(0); 
    526                                  
    527                                 $this->read_repositories(False); 
    528                                 if((isset($GLOBALS['phpgw_info']['server']['time_to_account_expires'])) && ($last_access) && ($this->account_lid!="expresso-admin")) { 
    529                                         if ($last_access+($GLOBALS['phpgw_info']['server']['time_to_account_expires']*86400) < time()) 
     521                        // Só verifica tempo de inatividade do usuário, caso esteja configurado no Administrador. 
     522                        if(isset($GLOBALS['phpgw_info']['server']['time_to_account_expires']) &&  
     523                                $this->account_id !=null && $this->account_lid != "expresso-admin") { 
     524                                        $last_access = $this->get_last_access_on_history($this->account_id); 
     525                                        $this->read_repositories(False); 
     526                                        if ($last_access && ($last_access+($GLOBALS['phpgw_info']['server']['time_to_account_expires']*86400) < time())) 
    530527                                        { 
    531528                                                if(is_object($GLOBALS['phpgw']->log)) 
     
    544541                                                return False; 
    545542                                        } 
    546                                 } 
    547543                        } 
    548544 
     
    627623 
    628624                /** 
    629                   * Retorna o UNIX DATE do ultimo acesso dessa conta, baseado na tabela de histórico. 
    630                   */ 
     625                 * Retorna o UNIX DATE do ultimo acesso dessa conta, baseado na tabela de histórico. 
     626                 */ 
    631627                function get_last_access_on_history($account_id) { 
    632628                        $GLOBALS['phpgw']->db->query("select li from phpgw_access_log where account_id='$account_id' order by li desc limit 1",__LINE__,__FILE__); 
Note: See TracChangeset for help on using the changeset viewer.