hack to check for cn and sn, which must be set in ldap

This commit is contained in:
Lars Kneschke 2003-12-22 12:46:38 +00:00
parent 656e6fb099
commit c839398de4

View File

@ -671,7 +671,18 @@
$ldap_fields['objectclass'][2] = 'phpgwContact';
//$ldap_fields['last_mod'] = $GLOBALS['phpgw']->datetime->gmtnow;
/* _debug_array($ldap_fields); */
// a hack!!
// there should be some validate function in this class
if(empty($ldap_fields['sn']))
{
$ldap_fields['sn'] = $ldap_fields['cn'];
}
if(empty($ldap_fields['cn']))
{
$ldap_fields['cn'] = $ldap_fields['sn'];
}
// _debug_array($ldap_fields); exit;
$err = ldap_add($this->ldap, $dn, $ldap_fields);
if (count($extra_fields))