allow to delete all groups
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 12 Jan 2012 08:27:32 +0000 (09:27 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 12 Jan 2012 08:27:32 +0000 (09:27 +0100)
PVE/API2/User.pm

index 6272cad..a919869 100644 (file)
@@ -247,7 +247,7 @@ __PACKAGE__->register_method ({
                $usercfg->{users}->{$username}->{expire} = $param->{expire} if defined($param->{expire});
 
                PVE::AccessControl::delete_user_group($username, $usercfg) 
-                   if (!$param->{append} && $param->{groups});
+                   if (!$param->{append} && defined($param->{groups}));
 
                if ($param->{groups}) {
                    foreach my $group (split_list($param->{groups})) {