Take into account alias visibility setting. (Closes #1136)
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 24 Jun 2010 16:46:16 +0000 (18:46 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 24 Jun 2010 16:46:16 +0000 (18:46 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/email.php
modules/profile.php

index 8994590..49c1cb7 100644 (file)
@@ -198,6 +198,7 @@ class EmailModule extends PLModule
                             $value, $user->profile()->id());
             }
             $visibility = ($value == 'public');
+            exit;
         }
 
         $page->assign('actuel', $alias);
index d27f480..b3e04a7 100644 (file)
@@ -247,7 +247,7 @@ class ProfileModule extends PLModule
         $page->setTitle($profile->fullName());
 
         // Determines and displays the virtual alias.
-        if (!is_null($owner)) {
+        if (!is_null($owner) && $profile->alias_pub == 'public') {
             $page->assign('virtualalias', $owner->emailAlias());
         }