Commits

Anonymous committed 4f2d654

Improving ant-spammer action

Comments (0)

Files changed (1)

elgg/actions/admin/user/spammer.php

 	
 	$options = array ('owner_guids' => $guid);
 	$entities = elgg_get_entities($options);
+	$count = count($entities);
 	
-	foreach( $entities as $entity ){
-		error_log("DELETED " . $entity->subtype );
-		$entity->delete();
-	}
+	for( $i = 0; $i < $count; $i++){
+		$entities[$i]->delete();
+	}	
 
 	if($obj->ban()) {
 		system_message(sprintf(elgg_echo('admin:user:spammer:yes'), $name));