From 917ce5b411df5bf3f943b93214538c401a6f9e85 Mon Sep 17 00:00:00 2001
From: fabrixxm <fabrix.xm@gmail.com>
Date: Mon, 29 Dec 2014 16:04:51 +0100
Subject: [PATCH] Adds optional parameter 'uid' to Emailer::send() that is the
 user id of the recipient of the mail. Make enotify pass it to Emailer::send()

---
 include/Emailer.php | 1 +
 include/enotify.php | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/Emailer.php b/include/Emailer.php
index f61636d959..3c0f4047c6 100644
--- a/include/Emailer.php
+++ b/include/Emailer.php
@@ -14,6 +14,7 @@ class Emailer {
 	 * @param htmlVersion		html version of the message
 	 * @param textVersion		text only version of the message
 	 * @param additionalMailHeader	additions to the smtp mail header
+	 * @param optional uid      user id of the destination user
 	 */
 	static public function send($params) {
 
diff --git a/include/enotify.php b/include/enotify.php
index 8b5002cb2a..99bc0fd324 100644
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -598,6 +598,7 @@ function notification($params) {
 		// use the Emailer class to send the message
 
 		return Emailer::send(array(
+			'uid' => $params['uid'],
 			'fromName' => $sender_name,
 			'fromEmail' => $sender_email,
 			'replyTo' => $sender_email,