$now = time();
$newdn = 'uid='.$now;
if (empty($_REQUEST['type'])) { $_REQUEST['type']='public'; }
- if($_REQUEST['type'] == 'private'){
+ if($_REQUEST['type'] == 'private' && $conf['privatebook']){
$newdn .= ', '.$conf['privatebook'].', '.$_SESSION['ldapab']['binddn'];
}else{
$newdn .= ', '.$conf['publicbook'];
unlink($file['tmp_name']);
return $data;
} else {
- $smarty->assign('jpegError',$lang['err_wrongFileType']);
+ $smarty->assign('jpegError',$lang['err_wrongFileType']);
}
} else {
$smarty->assign('jpegError',$lang['err_fileNotUploaded']);
$sr = ldap_list($LDAP_CON,$conf['publicbook'],"ObjectClass=inetOrgPerson",array("marker"));
$result1 = ldap_get_binentries($LDAP_CON, $sr);
//check users private addressbook
- if(!empty($_SESSION['ldapab']['binddn'])){
+ if(!empty($_SESSION['ldapab']['binddn']) && $conf['privatebook']){
$sr = @ldap_list($LDAP_CON,
$conf['privatebook'].','.$_SESSION['ldapab']['binddn'],
"ObjectClass=inetOrgPerson",array("marker"));
$sr = ldap_list($LDAP_CON,$conf['publicbook'],"ObjectClass=OXUserObject",array("OXUserCategories"));
$result1 = ldap_get_binentries($LDAP_CON, $sr);
//check users private addressbook
- if(!empty($_SESSION['ldapab']['binddn'])){
+ if(!empty($_SESSION['ldapab']['binddn']) && $conf['privatebook']){
$sr = @ldap_list($LDAP_CON,
$conf['privatebook'].','.$_SESSION['ldapab']['binddn'],
"ObjectClass=OXUserObject",array("OXUserCategories"));
$sr = ldap_list($LDAP_CON,$conf['publicbook'],"ObjectClass=OXUserObject",array("OXTimeZone"));
$result1 = ldap_get_binentries($LDAP_CON, $sr);
//check users private addressbook
- if(!empty($_SESSION['ldapab']['binddn'])){
+ if(!empty($_SESSION['ldapab']['binddn']) && $conf['privatebook']){
$sr = @ldap_list($LDAP_CON,
$conf['privatebook'].','.$_SESSION['ldapab']['binddn'],
"ObjectClass=OXUserObject",array("OXTimeZone"));
$sr = ldap_list($LDAP_CON,$conf['publicbook'],"ObjectClass=OXUserObject",array("userCountry"));
$result1 = ldap_get_binentries($LDAP_CON, $sr);
//check users private addressbook
- if(!empty($_SESSION['ldapab']['binddn'])){
+ if(!empty($_SESSION['ldapab']['binddn']) && $conf['privatebook']){
$sr = @ldap_list($LDAP_CON,
$conf['privatebook'].','.$_SESSION['ldapab']['binddn'],
"ObjectClass=OXUserObject",array("userCountry"));