Adding users to groups

There is a bug in the code for adding miltiple users to a group. Adding a single
user works but when you select more users it fails. See the patch for a fix.

– arthur de jong - arthur@west.nl - west consulting b.v. –

addusertogroup.patch (1013 Bytes)

Thanks for the bug report. A fix will be in .63

There is a bug in the code for adding miltiple users to a group. Adding a single
user works but when you select more users it fails. See the patch for a fix.

– arthur de jong - arthur@west.nl - west consulting b.v. –

Content-Description: addusertogroup.patch

— WebRT.1-3-62/html/Admin/Groups/Members.html Mon Mar 26 11:49:51 2001
+++ WebRT/html/Admin/Groups/Members.html Tue Mar 27 15:58:37 2001
@@ -47,19 +47,27 @@

$Group->Load($id) || Abort(‘Could not load group’);

my $key;
foreach $key (keys %ARGS) {

-if ($key =~ /^DeleteMember-(\d+)$/) {

  • my $id = $1;
  • if ($key =~ /^DeleteMember-(\d+)$/) {
  • my $id = $1;
    my ($val,$msg) = $Group->DeleteMember($id);
    push (@results, $msg);
    -}
    -if ($key =~ /^AddMembers$/) {
  • my ($val, $msg) = $Group->AddMember($ARGS{“$key”});
  • push (@results, $msg);
    -}
  • }
  • if ($key =~ /^AddMembers$/) {
  • if (ref($ARGS{“$key”}) eq “ARRAY”) {
  •  # we got an array of users to add
    
  •  my $bla;
    
  •  foreach $bla (@{$ARGS{"$key"}}) {
    
  •    my ($val, $msg) = $Group->AddMember($bla);
    
  •    push (@results, $msg);
    
  •  }
    
  • } else {
  •  # we got a single user to add
    
  •  my ($val, $msg) = $Group->AddMember($ARGS{"$key"});
    
  •  push (@results, $msg);
    
  • }
  • }
    }

</%INIT>

jesse reed vincent – root@eruditorum.orgjesse@fsck.com
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90

As I sit here alone looking at green text on a laptop in a mostly bare room listening
to loud music wearing all black, I realize that that it is much less cool in real life :slight_smile:
–Richard Tibbetts