]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
multi-user, do not cache open mbox
[friendica.git] / mod / profile.php
index 923f4fb90de99525abc5d0ab25a357d2eb6f0d8c..fa2c261df8409054d65140dfcd4f4cf1e7ca3401 100644 (file)
@@ -147,6 +147,26 @@ function profile_content(&$a, $update = 0) {
        
                        $jotplugins = '';
                        $jotnets = '';
+
+                       $mail_enabled = false;
+                       $pubmail_enabled = false;
+
+                       if($is_owner) {
+                               $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
+                                       intval(local_user())
+                               );
+                               if(count($r)) {
+                                       $mail_enabled = true;
+                                       if(intval($r[0]['pubmail']))
+                                               $pubmail_enabled = true;
+                               }
+                       }
+                       if($mail_enabled) {
+                      $selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
+                               $jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . 'value="1" /> '
+               . t("Post to Email") . '</div>';
+                       }
+                                       
                        call_hooks('jot_tool', $jotplugins); 
 
                        call_hooks('jot_networks', $jotnets);