summaryrefslogtreecommitdiff
path: root/includes/helper/email_helper.php
diff options
context:
space:
mode:
authorFelix Favre <gnomus@gnomus.de>2014-12-07 21:06:39 +0100
committerFelix Favre <gnomus@gnomus.de>2014-12-07 21:06:39 +0100
commit0cd8dd40a5c482a9b95abe454e2677481acf3ea6 (patch)
tree66462acb0ee65c562d7ad5a0dd651c2e3f46534c /includes/helper/email_helper.php
parentac82f3dcd2fd25106a08640641f80fc9e7b5f7d1 (diff)
parent55dc676b7726c494672202e3533628abf7fe8885 (diff)
Merge branch 'master' of github.com:engelsystem/engelsystem
Diffstat (limited to 'includes/helper/email_helper.php')
-rw-r--r--includes/helper/email_helper.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/includes/helper/email_helper.php b/includes/helper/email_helper.php
index b8ccabc4..5c7c64a8 100644
--- a/includes/helper/email_helper.php
+++ b/includes/helper/email_helper.php
@@ -1,12 +1,17 @@
<?php
-function engelsystem_email_to_user($user, $title, $message) {
- gettext_locale($user['Sprache']);
+function engelsystem_email_to_user($recipient_user, $title, $message, $not_if_its_me = false) {
+ global $user;
- $message = sprintf(_("Hi %s,"), $user['Nick']) . "\n\n" . _("here is a message for you from the engelsystem:") . "\n\n" . $message . "\n\n" . _("This email is autogenerated and has not to be signed. You got this email because you are registered in the engelsystem.");
+ if ($not_if_its_me && $user['UID'] == $recipient_user['UID'])
+ return true;
+
+ gettext_locale($recipient_user['Sprache']);
+
+ $message = sprintf(_("Hi %s,"), $recipient_user['Nick']) . "\n\n" . _("here is a message for you from the engelsystem:") . "\n\n" . $message . "\n\n" . _("This email is autogenerated and has not to be signed. You got this email because you are registered in the engelsystem.");
gettext_locale();
- return engelsystem_email($user['email'], $title, $message);
+ return engelsystem_email($recipient_user['email'], $title, $message);
}
function engelsystem_email($address, $title, $message) {