From ab099e91028122dfb6b10cf9510b1b061f6f547f Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 17 Apr 2011 23:27:11 -0700 Subject: email integration, cont. --- mod/profile.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mod/profile.php') 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 .= '
' + . t("Post to Email") . '
'; + } + call_hooks('jot_tool', $jotplugins); call_hooks('jot_networks', $jotnets); -- cgit v1.2.3