diff --git a/lam/lib/modules/dhcp_settings.inc b/lam/lib/modules/dhcp_settings.inc index 825ea3c1..d2aca48d 100644 --- a/lam/lib/modules/dhcp_settings.inc +++ b/lam/lib/modules/dhcp_settings.inc @@ -366,7 +366,7 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I $errors[] = $this->messages['cn'][0]; } // Check, if cn is not already use: - elseif ( $_SESSION['cache']->in_cache($_POST['cn'],'cn', array('dhcp')) && $this->orig['cn']['0']!=$_POST['cn'] ) { + elseif ((sizeof(searchLDAPByAttribute('cn', $_POST['cn'], 'dhcpOptions', array('cn'), array('dhcp'))) > 0) && $this->orig['cn']['0']!=$_POST['cn']) { $errors[] = $this->messages['cn'][1]; } elseif (!check_ip($_POST['cn'],true)) { diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc index 701d13b2..34177ac4 100644 --- a/lam/lib/modules/sambaGroupMapping.inc +++ b/lam/lib/modules/sambaGroupMapping.inc @@ -492,7 +492,8 @@ class sambaGroupMapping extends baseModule { $this->attributes['sambaSID'][0] = $SID."-".$this->rids[$rids[$i]]; // Do a check if special group is unique if ($this->getAccountContainer()->isNewAccount) { - if ($_SESSION['cache']->in_cache($SID."-".$this->rids[$rids[$i]], 'sambaSID', 'group')) { + $result = searchLDAPByAttribute('sambaSID', $SID."-".$this->rids[$rids[$i]], 'sambaGroupMapping', array('sambaSID'), array('group')); + if (sizeof($result) > 0) { $message = $this->messages['sambaSID'][0]; $message[] = $rids[$i]; $errors[] = $message;