Ignore:
Timestamp:
11/26/09 16:30:14 (14 years ago)
Author:
niltonneto
Message:

Ticket #795 - Corrigido problema no template classic.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/templates/classic/login_classic.php

    r1151 r1717  
    105105        if(isset($passwd_type) || $_POST['submitit_x'] || $_POST['submitit_y'] || $submit) 
    106106        { 
    107 /////   Início - Código temporário: Para renomeação de login com organização para sem. ////// 
    108 /*              $common = CreateObject('phpgwapi.common'); 
    109                 $ldap_conn = $common->ldapConnect(); 
    110                 $justthese = array("uid"); 
    111                 $filter="(&(phpgwAccountType=u)(uid=".$_POST['user']."))"; 
    112                 $ldap_search = ldap_search($ldap_conn, $GLOBALS['phpgw_info']['server']['ldap_context'], $filter, $justthese); 
    113                 $ldap_info       = ldap_get_entries($ldap_conn, $ldap_search); 
    114                 if ($ldap_info['count'] != 0) // Verifica se o login existe sem organização. 
    115                 { 
    116                         $_POST['login'] = $_POST['user']; 
    117                 } 
    118                 ldap_close($ldap_conn);*/ 
    119 ///     Fim - Código temporário: Para renomeação de login com organização para sem. ////// 
     107                if($_POST['user']) { 
     108                        if($GLOBALS['phpgw_info']['server']['use_prefix_organization']) { 
     109                                $common = CreateObject('phpgwapi.common'); 
     110                                $ldap_conn = $common->ldapConnect(); 
     111                                $justthese = array("uid"); 
     112                                $filter="(&(phpgwAccountType=u)(uid=".$_POST['user']."))"; 
     113                                $ldap_search = ldap_search($ldap_conn, $GLOBALS['phpgw_info']['server']['ldap_context'], $filter, $justthese); 
     114                                $ldap_info       = ldap_get_entries($ldap_conn, $ldap_search); 
     115                                ldap_close($ldap_conn); 
     116                                if ($ldap_info['count'] != 0) { 
     117                                        $_POST['login'] = $_POST['user']; 
     118                                } 
     119                        } 
     120                        else 
     121                                $_POST['login'] = $_POST['user']; 
     122                } 
    120123                if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' && 
    121124                        !isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN'])) 
     
    226229        if($GLOBALS['phpgw_info']['server']['use_prefix_organization']) 
    227230        { 
    228                 $organization_select = "<tr><td width=\"66\" class=\"loginLabel\">"; 
    229                 $organization_select .= lang("organization").":</td>"; 
    230                 $organization_select .="<td width=\"135\">";                                                                                     
    231                 $organization_select .="<select name=\"organization\">\n";               
     231                $organization_select = "<tr><td width=\"96\" class=\"loginLabel\">"; 
     232                $organization_select .= lang("organization").":&nbsp;</td>"; 
     233                $organization_select .= "<td width=\"135\">";                                                            
     234                $organization_select .= "<select name=\"organization\">\n";              
    232235                 
    233236                $obj_organization = CreateObject('phpgwapi.sector_search_ldap'); 
Note: See TracChangeset for help on using the changeset viewer.