Fix the inline-documentation: LiCoM::Person doesn't provide a `group' method.
[licom.git] / lib / LiCoM / Person.pm
index 887e39e..4ba1be4 100644 (file)
@@ -431,8 +431,6 @@ sub name
 
 =item I<$obj>-E<gt>B<uri> ([I<@uri>])
 
-=item I<$obj>-E<gt>B<group> ([I<@groups>])
-
 Get or set the attribute. This is the same as calling S<I<$obj>-E<gt>B<set>
 (I<$field>, I<\@values>)> or S<I<$obj>-E<gt>B<get> (I<$field>)>.
 
@@ -492,7 +490,7 @@ sub set
        }
        if (!defined ($ValidFields{$field}))
        {
-               return (undef);
+               return;
        }
 
        if (defined ($value))
@@ -514,7 +512,10 @@ sub set
                $entry->update ($Ldap);
        }
 
-       $obj->{$field} = [] unless (defined ($obj->{$field}));
+       if (!defined ($obj->{$field}) and $ValidFields{$field})
+       {
+               $obj->{$field} = [];
+       }
        
        if (wantarray () and $ValidFields{$field})
        {