From 4a4907a63a180a692553704200758803b842b494 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 13 Aug 2005 09:38:32 +0000 Subject: [PATCH] do not set RDN from profile if active modules do not support it --- 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 d4acc84b..54268691 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -793,7 +793,9 @@ class accountContainer { $modules = array_keys($this->module); foreach ($modules as $module) $this->module[$module]->load_profile($profile); if (isset($profile['ldap_rdn'][0])) { - $this->rdn = $profile['ldap_rdn'][0]; + if (in_array($profile['ldap_rdn'][0], getRDNAttributes($this->type))) { + $this->rdn = $profile['ldap_rdn'][0]; + } } if (isset($profile['ldap_suffix'][0])) { $this->dn = $profile['ldap_suffix'][0]; @@ -1439,7 +1441,9 @@ class accountContainer { $modules = array_keys($this->module); foreach ($modules as $module) $this->module[$module]->load_profile($profile); if (isset($profile['ldap_rdn'][0])) { - $this->rdn = $profile['ldap_rdn'][0]; + if (in_array($profile['ldap_rdn'][0], getRDNAttributes($this->type))) { + $this->rdn = $profile['ldap_rdn'][0]; + } } if (isset($profile['ldap_suffix'][0])) { $this->dn = $profile['ldap_suffix'][0];