Code

Sync with gosa-lhm.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Nov 2008 14:42:16 +0000 (14:42 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Nov 2008 14:42:16 +0000 (14:42 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12988 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/server/events/gosaTriggered.pm

index 714a4eef44558ca3933badb350ef3ad2f1522ad5..226db9f930a18b280c0599ab0a3ebb3e0f856871 100644 (file)
@@ -966,7 +966,11 @@ sub trigger_activate_new {
     }
 
     # Add to ObjectGroup
-    if(!(scalar grep $_ eq $ldap_entry->dn, @{$ogroup_entry->get_value('member', asref => 1)})) {
+    my $ogroup_member = $ogroup_entry->get_value('member', asref => 1);
+    if( (!defined($ogroup_member)) ||
+        (!defined($ldap_entry)) ||
+        (!defined($ldap_entry->dn)) ||
+        (!(scalar grep $_ eq $ldap_entry->dn, @{$ogroup_member}))) {
       $ogroup_entry->add (
         'member' => $ldap_entry->dn(),
       );