diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc index bf72a4e5..bb8262da 100644 --- a/lam/lib/modules/sambaGroupMapping.inc +++ b/lam/lib/modules/sambaGroupMapping.inc @@ -222,22 +222,17 @@ class sambaGroupMapping extends baseModule { $displayNameInput->setFieldMaxLength(50); $return->addElement($displayNameInput, true); // Windows group - $selected = array(); + $options = array($this->getCn()); + $selected = array($this->getCn()); $names = array_keys($this->rids); $wrid=false; for ($i=0; $iattributes['sambaSID'][0]) && ($this->attributes['sambaSID'][0]==$SID."-".$this->rids[$names[$i]])) { - $selected[] = $names[$i]; + $selected = array($names[$i]); $wrid=true; } $options[] = $names[$i]; } - if ($wrid) { - $options[] = $this->getCn(); - } - else { - $selected[] = $this->getCn(); - } $return->addElement(new htmlTableExtendedSelect('sambaSID', $options, $selected, _('Windows group'), 'sambaSID'), true); // group type $names = array_keys($this->sambaGroupTypes);