Changeset 1867
- Timestamp:
- 12/17/09 12:35:01 (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 nbproject 2 3 header.inc.php
-
- Property svn:ignore
-
trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
r1520 r1867 341 341 $entries = ldap_get_entries($local_ldap_connection,$search); 342 342 343 if ( ($entries['count'] != 1) && (strcasecmp($uid, $entries[0]['uid'][0]) != 0) )343 if ( ($entries['count'] > 0 ) && (strcasecmp($uid, $entries[0]['uid'][0]) != 0) ) 344 344 { 345 345 if ($entries['count'] > 0) 346 346 { 347 $result['question'] = $this->functions->lang('Field CPF used by') . ":\n"; 348 for ($i=0; $i<$entries['count']; $i++) 349 { 350 if (strcasecmp($uid, $entries[$i]['uid'][0]) != 0) 351 $result['question'] .= "- " . $entries[$i]['cn'][0] . "\n"; 352 } 353 $result['question'] .= $this->functions->lang("Do you want to continue anyway") . "?"; 354 return $result; 347 $entries_text = ""; 348 for ($i=0; $i<$entries['count']; $i++) 349 { 350 if (strcasecmp($uid, $entries[$i]['uid'][0]) != 0) 351 $entries_text .= "- " . $entries[$i]['cn'][0] . "\n"; 352 } 353 if ($this->current_config['expressoAdmin_deny_same_cpf'] == 'false' ) 354 { 355 $result['question'] = $this->functions->lang('Field CPF used by') . ":\n"; 356 $result['question'] .= $entries_text; 357 $result['question'] .= $this->functions->lang("Do you want to continue anyway") . "?"; 358 return $result; 359 } else { 360 $result['status'] = false; 361 $result['msg'] = $this->functions->lang('Field CPF cannot be duplicated') . ".\n"; 362 $result['msg'] .= $this->functions->lang('Field CPF used by') . ":\n"; 363 $result['msg'] .= $entries_text; 364 return $result; 365 } 366 355 367 } 356 368 } -
trunk/expressoAdmin1_2/templates/default/config.tpl
r1521 r1867 135 135 </tr> 136 136 137 <tr class="row_off"> 138 <td>{lang_deny_user_accounts_with_the_same_cpf}?</td> 139 <td> 140 <select name="newsettings[expressoAdmin_deny_same_cpf]"> 141 <option value="false" {selected_expressoAdmin_deny_same_cpf_false}>{lang_no}</option> 142 <option value="true" {selected_expressoAdmin_deny_same_cpf_true}>{lang_yes}</option> 143 </select> 144 </td> 145 </tr> 146 137 147 <tr class="row_th"> 138 148 <td>{lang_maximum_length_of_photo_archive__(default_10240_=_10_kb)}:</td> 139 149 <td><input name="newsettings[expressoAdmin_photo_length]" value="{value_expressoAdmin_photo_length}" size="15" /></td> 140 150 </tr> 141 151 142 152 <tr class="th"> 143 153 <td colspan="2" align="center"><b>{lang_Configurations_to_get_nextID_from_another_DB}<br>{lang_Leave_the_host_field_empty_to_use_the_same_DB_of_the_ExpressoLivre}</b></td>
Note: See TracChangeset
for help on using the changeset viewer.