aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-04-17 23:27:11 -0700
committerFriendika <info@friendika.com>2011-04-17 23:27:11 -0700
commitab099e91028122dfb6b10cf9510b1b061f6f547f (patch)
tree126742a2c75edd037b52de9e2525f1cffd630604 /mod/profile.php
parent7cc5a9bba9ee892bac41fe3af4ae00da846ca96a (diff)
downloadvolse-hubzilla-ab099e91028122dfb6b10cf9510b1b061f6f547f.tar.gz
volse-hubzilla-ab099e91028122dfb6b10cf9510b1b061f6f547f.tar.bz2
volse-hubzilla-ab099e91028122dfb6b10cf9510b1b061f6f547f.zip
email integration, cont.
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/mod/profile.php b/mod/profile.php
index 923f4fb90..fa2c261df 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -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);