Ignore:
Timestamp:
10/07/10 13:43:20 (14 years ago)
Author:
rafaelraymundo
Message:

Ticket #1366 - Configura dias de validade da senha do usuario(desabilta se null)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/phpgwapi/templates/default/navbar.inc.php

    r3331 r3338  
    266266                        } 
    267267 
    268                         if (!$GLOBALS['phpgw_info']['server']['max_password_age']) 
    269                                 $GLOBALS['phpgw_info']['server']['max_password_age'] = 90; 
     268                        if ($GLOBALS['phpgw_info']['server']['max_pwd_age'] && $GLOBALS['phpgw_info']['server']['max_pwd_age'] > 0 ) 
     269                            { 
     270                                $aux = time() - (86400*$GLOBALS['phpgw_info']['server']['max_pwd_age']); 
     271                            } 
     272                        else 
     273                            { 
     274                                $aux = $GLOBALS['phpgw_info']['server']['max_pwd_age']; 
     275                            } 
    270276 
    271277                        if(($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == '0'  && (($GLOBALS['phpgw_info']['user']['agree_terms'] == 1) || ($GLOBALS['phpgw_info']['server']['use_agree_term']!='True'))) || 
    272                                 ($GLOBALS['phpgw_info']['user']['lastpasswd_change'] < time() - (86400*$GLOBALS['phpgw_info']['server']['max_password_age']))) 
     278                                $GLOBALS['phpgw_info']['user']['lastpasswd_change'] < $aux) 
    273279                        { 
    274280                                $changepasswd_url = $_SERVER['HTTP_HOST'] . $GLOBALS['phpgw_info']['server']['webserver_url'] . '/preferences/changepassword.php?cd=1'; 
Note: See TracChangeset for help on using the changeset viewer.