Changeset 4508 for sandbox


Ignore:
Timestamp:
05/25/11 15:45:25 (13 years ago)
Author:
airton
Message:

Ticket #1932 - Problemas de autenticacao no LDAP nas configurações de um contato

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.2.0.2/contactcenter/inc/hook_config_validate.inc.php

    r4504 r4508  
    2424                $error = false; 
    2525                 
    26 //              if($value['cc_global_source0'] == 'ldap') 
    27 //              { 
    28 //                      if (!$value['cc_ldap_host0']) 
    29 //                      { 
    30 //                              $error[] = '<br>LDAP host must be set!'; 
    31 //                      } 
    32 //                       
    33 //                      if(!$value['cc_ldap_context0']) 
    34 //                      { 
    35 //                              $error[] = '<br>There must be a Context'; 
    36 //                      } 
    37 //                       
    38 //                      if(!$value['cc_ldap_browse_dn0']) 
    39 //                      { 
    40 //                              $error[] = '<br>The Browse Account must be set'; 
    41 //                      }        
    42 //              } 
     26/*      if($value['cc_global_source0'] == 'ldap') 
     27                { 
     28                        if (!$value['cc_ldap_host0']) 
     29                        { 
     30                                $error[] = '<br>LDAP host must be set!'; 
     31                        } 
     32                         
     33                        if(!$value['cc_ldap_context0']) 
     34                        { 
     35                                $error[] = '<br>There must be a Context'; 
     36                        } 
    4337                 
     38                        if(!$value['cc_ldap_browse_dn0']) 
     39                        { 
     40                                $error[] = '<br>The Browse Account must be set'; 
     41                        }        
     42 
     43                        if ($value['cc_ldap_pw0'] != $_POST['cc_ldap_pw0'])  
     44                        { 
     45                                $error[] = '<br>Invalid LDAP Password!'; 
     46                        } 
     47 
     48                } */             
     49 
     50                /* Check if the password field is blank, then discard changes */  
    4451                foreach ($value as $attr_name => $attr_value) { 
    4552                        if ($attr_value == '') { 
     
    5158                foreach ($nums as $num) { 
    5259                        //Deleta toda a tupla que contem o atributo vazio 
    53                         foreach ($value as $attr_name_x => $attr_value_x) { 
    54                          
     60                        foreach ($value as $attr_name_x => $attr_value_x) {      
    5561                                if (strpos($attr_name_x, $num) !== false) { 
    5662                                        if (strpos($attr_name_x, 'cc_attribute_name') !== false) 
    57                                                 $error[] = "<br/>" . lang("Could not find the LDAP attribute pointed by") . "  " . $attr_value_x;        
     63                                                //$error[] = "<br/>" . lang("Could not find the LDAP attribute pointed by") . "  " . $attr_value_x;      
    5864                                         
    5965                                        unset($value[$attr_name_x]);     
     
    9399         */ 
    94100        function cc_attribute_ldapname(&$value) { 
     101                /* 
     102                //Retirada a validação dos campos correspondentes no LDAP. 
    95103                $ldap = CreateObject('contactcenter.bo_ldap_manager'); 
    96104                $ds = $GLOBALS['phpgw']->common->ldapConnect($ldap->srcs[1]['host'], $ldap->srcs[1]['acc'], $ldap->srcs[1]['pw'], true);                                 
     
    103111                        $value = ""; 
    104112                ldap_close($ds); 
     113                */ 
    105114        } 
    106115?> 
Note: See TracChangeset for help on using the changeset viewer.