From 81185b5072087a31b998281ec78ab71b990376f4 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 26 Nov 2009 13:20:36 +0000 Subject: [PATCH] do not use in_cache --- lam/lib/modules/posixGroup.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index 624a1af2..3d5873ed 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -599,11 +599,11 @@ class posixGroup extends baseModule implements passwordService { // Create automatic useraccount with number if original user already exists // Reset name to original name if new name is in use // Set username back to original name if new username is in use - if ($_SESSION['cache']->in_cache($this->attributes['cn'][0],'cn', 'group')!=false && ($this->orig['cn'][0]!='')) { + if ((sizeof(searchLDAPByAttribute('cn', $this->attributes['cn'][0], 'posixGroup', array('cn'), array('group'))) > 0) && ($this->orig['cn'][0]!='')) { $this->attributes['cn'][0] = $this->orig['cn'][0]; } // Change gid to a new gid until a free gid is found - else while ($_SESSION['cache']->in_cache($this->attributes['cn'][0], 'cn', 'group')) { + else while (sizeof(searchLDAPByAttribute('cn', $this->attributes['cn'][0], 'posixGroup', array('cn'), array('group'))) > 0) { // get last character of username $lastchar = substr($this->attributes['cn'][0], strlen($this->attributes['cn'][0])-1, 1); // Last character is no number