$newdn = 'uid='.$new_uid;
if (empty($_REQUEST['type'])) { $_REQUEST['type']='public'; }
if($_REQUEST['type'] == 'private' && $conf['privatebook']){
- $newdn .= ', '.$conf['privatebook'].', '.$_SESSION['ldapab']['binddn'];
+ $newdn .= ','.$conf['privatebook'].','.$_SESSION['ldapab']['binddn'];
}else{
- $newdn .= ', '.$conf['publicbook'];
+ $newdn .= ','.$conf['publicbook'];
}
$entry['displayname'] = $entry['givenname'].' '.$entry['name'];;
$entry = prepare_ldap_entry($entry);
if(empty($dn)){
//new entry
$entry['uid'][] = $new_uid;
- $r = ldap_add($LDAP_CON,$newdn,$entry);
+ $r = @ldap_add($LDAP_CON,$newdn,$entry);
tpl_ldaperror();
return $newdn;
}else{
//create private address book if simple enough
if(preg_match('/ou=([^,]+)$/',$conf['privatebook'],$match)){
$privatedn = $conf['privatebook'].', '.$_SESSION['ldapab']['binddn'];
- if(!ldap_read($LDAP_CON,$privatedn,'')){
- ldap_add($LDAP_CON,$privatedn,
+ if(!@ldap_read($LDAP_CON,$privatedn,'')){
+ @ldap_add($LDAP_CON,$privatedn,
array('objectClass' => array ('organizationalUnit','top'),
'ou' => $match[1]));
}