Set default value for visibility when not logged.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 8 Mar 2009 18:48:45 +0000 (19:48 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 8 Mar 2009 18:48:45 +0000 (19:48 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/profile.php

index 11b08ed..6e68dc9 100644 (file)
@@ -61,6 +61,9 @@ class Profile
         $this->data = $data;
         $this->pid = $this->data['pid'];
         $this->hrpid = $this->data['hrpid'];
+        if (!S::logged()) {
+            $this->setVisibilityLevel(self::VISIBILITY_PUBLIC);
+        }
     }
 
     public function id()