From ddd8ae79c3130db9174a15bd4961b8f79f43aed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be> Date: Wed, 7 Dec 2016 06:15:57 +0100 Subject: [PATCH] Fixes #5258 Avoid errors when loading node with missing objectClass --- include/class_plugin.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/class_plugin.inc b/include/class_plugin.inc index 343e24b40..f3ee08ca3 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -166,6 +166,11 @@ class plugin if (empty($this->attrs)) { throw new NonExistingLdapNodeException('Could not open dn '.$this->dn); } + if ($this->mainTab) { + /* Make sure that initially_was_account is TRUE if we loaded an LDAP node, + * even if it’s missing an objectClass */ + $this->is_account = TRUE; + } } /* Set the template flag according to the existence of objectClass fdTemplate */ -- GitLab