From fe0e270135c7d65e2ec391d1eecc8098b3ebc439 Mon Sep 17 00:00:00 2001
From: root <root@postoffice.intern>
Date: Tue, 29 Aug 2023 12:55:04 +0200
Subject: [PATCH] include/class_pathNavigator.inc: Don't send object DN for new
 objects when registering plugin.

---
 include/class_pathNavigator.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class_pathNavigator.inc b/include/class_pathNavigator.inc
index f2003d8..e04bebd 100644
--- a/include/class_pathNavigator.inc
+++ b/include/class_pathNavigator.inc
@@ -22,7 +22,7 @@ class pathNavigator
         // In case of tabs add the 'dn' of the entry
         if ($class instanceof tabs) {
             // Convert dn to cn
-            if (isset($class->dn)) {
+            if (isset($class->dn) && $class->dn !== "new") {
                 if (!session::is_set("pathNavigator::registerPlugin:{$class->dn}")) {
                     global $config;
                     $ldap = $config->get_ldap_link();
-- 
2.39.2

