From 8da59685facff4136649c5e3f0259cdf66f560dd Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 26 Sep 2005 11:57:17 +0000 Subject: [PATCH] fixed some cache calls --- lam/lib/modules/posixGroup.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index ff2a5840..0d90f71d 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -568,10 +568,10 @@ class posixGroup extends baseModule { else $this->changegids=false; if ($this->attributes['gidNumber'][0]!=$post['gidNumber'] || ($this->triggered_messages['gidNumber'][0]='ERROR')) { // Check if GID is valid. If none value was entered, the next useable value will be inserted - // load min and may uidNumber + // load min and max GID number $minID = intval($this->moduleSettings['posixGroup_minGID'][0]); $maxID = intval($this->moduleSettings['posixGroup_maxGID'][0]); - $dn_gids = $_SESSION['cache']->get_cache('gidNumber', 'posixGroup', '*'); + $dn_gids = $_SESSION['cache']->get_cache('gidNumber', 'posixGroup', 'group'); // get_cache will return an array ( dn1 => array(uidnumber1), dn2 => array(uidnumber2), ... ) if(is_array($dn_gids)) { foreach ($dn_gids as $gid) $gids[] = $gid[0]; @@ -618,11 +618,11 @@ class posixGroup extends baseModule { // 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', '*')!=false && ($this->orig['cn'][0]!='')) { + if ($_SESSION['cache']->in_cache($this->attributes['cn'][0],'cn', 'group')!=false && ($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', '*')) { + else while ($_SESSION['cache']->in_cache($this->attributes['cn'][0], 'cn', 'group')) { // get last character of username $lastchar = substr($this->attributes['cn'][0], strlen($this->attributes['cn'][0])-1, 1); // Last character is no number