From 8df6bab139fdea2333786a73a28bb0cbef3531ea Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 15 Jan 2008 18:13:34 +0000 Subject: [PATCH] skip user input processing if profile is loaded --- lam/lib/modules.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 837df79c..284f096c 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -837,12 +837,12 @@ class accountContainer { $result = array(); $stopProcessing = false; // when set to true, no module options are displayed $errorsOccured = false; - $this->loadProfileIfRequested(); + $profileLoaded = $this->loadProfileIfRequested(); if ($this->subpage=='') $this->subpage='attributes'; if (isset($_POST['accountContainerReset'])) { $result = $this->load_account($this->dn_orig); } - else { + elseif (!$profileLoaded) { // change dn suffix if (isset($_REQUEST['suffix']) && ($_REQUEST['suffix'] != '')) { $this->dn = $_REQUEST['suffix']; @@ -1086,6 +1086,8 @@ class accountContainer { /** * Checks if the user requested to load a profile. + * + * @return boolean true, if profile was loaded */ private function loadProfileIfRequested() { if (isset($_POST['accountContainerLoadProfile']) && isset($_POST['accountContainerSelectLoadProfile'])) { @@ -1102,7 +1104,9 @@ class accountContainer { if (isset($profile['ldap_suffix'][0])) { $this->dn = $profile['ldap_suffix'][0]; } + return true; } + return false; } /**