From: hickert Date: Wed, 19 Jul 2006 10:45:18 +0000 (+0000) Subject: Fixed detection of used member names X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=267679ea32e10645cd6f6dc83e033994327d8d6a;p=gosa.git Fixed detection of used member names git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4233 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 026870745..2f1ccd595 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -811,13 +811,12 @@ class printgeneric extends plugin if($ldap->count()){ $attrs = $ldap->fetch(); - + $name = $attrs[$var][0]; + /* Check if this uid/cn is already assigned to any permission */ foreach($types as $ctype){ - if($type == $ctype) continue; - - if(in_array($attrs[$var][0],$this->member[$ctype])){ - print_red(sprintf(_("Can't add '%s' to members it is already used in another category."),$attrs[$var][0])); + if(isset( $this->member[$ctype][$name])){ + print_red(sprintf(_("Can't add '%s' to the list of members, it is already used."),$attrs[$var][0])); return; } }