When adding a new address to a profile, tick the "can receive mail" checkbox by default
[platal.git] / modules / profile.php
index 42c93ed..7f2136a 100644 (file)
@@ -224,6 +224,8 @@ class ProfileModule extends PLModule
         }
 
         // Determines the access level at which the profile will be displayed.
+        // Note: VIEW_HIDDEN can NOT be selected. The admins who want to read
+        // information need to use the "edit profile" pages instead.
         if (Env::v('view') == 'public') {
             $view = Visibility::VIEW_PUBLIC;
         } else if (Env::v('view') == 'ax') {
@@ -391,7 +393,7 @@ class ProfileModule extends PLModule
         pl_content_headers("text/html");
         $page->changeTpl('profile/adresses.address.tpl', NO_SKIN);
         $page->assign('i', $id);
-        $page->assign('address', array());
+        $page->assign('address', array('mail' => true));
         $page->assign('profile', Profile::get($pid));
         $page->assign('isMe', true);
         $page->assign('geocoding_removal', true);