From 267679ea32e10645cd6f6dc83e033994327d8d6a Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 19 Jul 2006 10:45:18 +0000 Subject: [PATCH] Fixed detection of used member names git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4233 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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; } } -- 2.30.2