Fix vcard generation: only users with a valid forlife are added (Closes #846)
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 27 Jun 2008 22:03:59 +0000 (00:03 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 27 Jun 2008 22:03:59 +0000 (00:03 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
include/vcard.inc.php

index a4366fc..ccb8526 100644 (file)
@@ -37,8 +37,11 @@ class VCardIterator implements PlIterator
 
     public function add_user($user)
     {
-        $this->user_list[] = get_user_forlife($user);
-        $this->count++;
+        $forlife = get_user_forlife($user, '_silent_user_callback');
+        if ($forlife) {
+            $this->user_list[] = get_user_forlife($user);
+            $this->count++;
+        }
     }
 
     public function first()
@@ -172,7 +175,6 @@ class VCard
         header("Pragma: ");
         header("Cache-Control: ");
         header("Content-type: text/x-vcard; charset=UTF-8");
-        header("Content-Transfer-Encoding: 8bit");
   }
 }