Changeset 5371


Ignore:
Timestamp:
01/12/12 13:33:33 (12 years ago)
Author:
brunocosta
Message:

Ticket #2299 - Pega a msg para o usuário no atributo "usrworkleaveobs" no LDAP

Location:
branches/2.3/phpgwapi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/phpgwapi/inc/class.auth_ldap.inc.php

    r5118 r5371  
    5656                        } 
    5757                        /* find the dn for this uid, the uid is not always in the dn */ 
    58                         $attributes     = array('uid','dn','givenName','sn','mail','uidNumber','gidNumber','usercertificate'); 
     58                        $attributes     = array('uid','dn','givenName','sn','mail','uidNumber','gidNumber','usercertificate','usrworkleaveobs'); 
    5959                        $filter = $GLOBALS['phpgw_info']['server']['ldap_search_filter'] ? $GLOBALS['phpgw_info']['server']['ldap_search_filter'] : '(uid=%user)'; 
    6060                        $filter = str_replace(array('%user','%domain'),array($username,$GLOBALS['phpgw_info']['user']['domain']),$filter); 
     
    9696                                } 
    9797                                /* try to bind as the user with user suplied password */ 
    98                                 if (@ldap_bind($ldap, $userDN, $passwd)) 
     98                                 
     99                                if($allValues[0]['usrworkleaveobs']) 
     100                                        $GLOBALS['usrworkleaveobs'] = $allValues[0]['usrworkleaveobs'][0]; 
     101                                 
     102                                if (@ldap_bind($ldap, $userDN, $passwd)) 
    99103                                { 
    100104                                        if ($GLOBALS['phpgw_info']['server']['account_repository'] != 'ldap') 
     
    124128                                }else{ 
    125129                                    if(ldap_errno($ldap) == 53) 
    126                                         return 0; 
     130                                            return 0; 
     131                                    } 
    127132                                } 
    128                         } 
    129133                        /* dn not found or password wrong */ 
    130134                        return False; 
  • branches/2.3/phpgwapi/templates/default/login_default.php

    r5277 r5371  
    3232                                 
    3333                        case 97: 
    34                                 return '<font color="FF0000">' . lang('Account blocked, please contact the system administrator.') . '</font>'; 
     34                                return '<font color="FF0000">' . $GLOBALS['usrworkleaveobs']?$GLOBALS['usrworkleaveobs']:lang('Account blocked, please contact the system administrator.') . '</font>'; 
    3535                        case 98: 
    3636                                return '<font color="FF0000">' . lang('Account is expired') . '</font>'; 
Note: See TracChangeset for help on using the changeset viewer.