diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 0cbbea6f..eea832df 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -775,11 +775,11 @@ class accountContainer { } elseif (!$profileLoaded) { // change dn suffix - if (isset($_REQUEST['suffix']) && ($_REQUEST['suffix'] != '')) { - $this->dn = $_REQUEST['suffix']; + if (isset($_GET['suffix']) && ($_GET['suffix'] != '') && ($this->dn == null)) { + $this->dn = $_GET['suffix']; } - if (isset($_REQUEST['accountContainerSuffix']) && ($_REQUEST['accountContainerSuffix'] != '')) { - $this->dn = $_REQUEST['accountContainerSuffix']; + if (isset($_POST['accountContainerSuffix']) && ($_POST['accountContainerSuffix'] != '')) { + $this->dn = $_POST['accountContainerSuffix']; } // change RDN if (isset($_POST['accountContainerRDN'])) { @@ -1257,7 +1257,7 @@ class accountContainer { $this->rdn = $profile['ldap_rdn'][0]; } } - if (isset($profile['ldap_suffix'][0])) { + if (isset($profile['ldap_suffix'][0]) && ($profile['ldap_suffix'][0] != '-')) { $this->dn = $profile['ldap_suffix'][0]; } return true; @@ -1538,7 +1538,7 @@ class accountContainer { $this->rdn = $profile['ldap_rdn'][0]; } } - if (isset($profile['ldap_suffix'][0])) { + if (isset($profile['ldap_suffix'][0]) && ($profile['ldap_suffix'][0] != '-')) { $this->dn = $profile['ldap_suffix'][0]; } // get titles diff --git a/lam/templates/profedit/profilepage.php b/lam/templates/profedit/profilepage.php index bac04232..d4b34f9d 100644 --- a/lam/templates/profedit/profilepage.php +++ b/lam/templates/profedit/profilepage.php @@ -178,7 +178,7 @@ $dnContent->addElement(new htmlSpacer(null, '10px'), true); // get root suffix $rootsuffix = $_SESSION['config']->get_Suffix($type); // get subsuffixes -$suffixes = array(); +$suffixes = array('-' => '-'); $typeObj = new $type(); $possibleSuffixes = $typeObj->getSuffixList(); foreach ($possibleSuffixes as $suffix) {