From dabe15eb5403b58514aaa4729c39c94edb112c48 Mon Sep 17 00:00:00 2001 From: Jerome Bakker Date: Fri, 28 Sep 2012 13:37:19 +0200 Subject: fixed: wrong link in message notification --- mod/messages/start.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'mod/messages/start.php') diff --git a/mod/messages/start.php b/mod/messages/start.php index 2e61d6e21..58636eea8 100644 --- a/mod/messages/start.php +++ b/mod/messages/start.php @@ -289,16 +289,19 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify $message_contents = strip_tags($body); if ($send_to != elgg_get_logged_in_user_entity() && $notify) { + $to_user = get_user($send_to); + $from_user = elgg_get_logged_in_user_entity(); + $subject = elgg_echo('messages:email:subject'); $body = elgg_echo('messages:email:body', array( - elgg_get_logged_in_user_entity()->name, + $from_user->name, $message_contents, - elgg_get_site_url() . "messages/inbox/" . $user->username, - elgg_get_logged_in_user_entity()->name, - elgg_get_site_url() . "messages/compose?send_to=" . elgg_get_logged_in_user_guid() + elgg_get_site_url() . "messages/inbox/" . $to_user->username, + $from_user->name, + elgg_get_site_url() . "messages/compose?send_to=" . $from_user->getGUID() )); - notify_user($send_to, elgg_get_logged_in_user_guid(), $subject, $body); + notify_user($to_user->getGUID(), $from_user->getGUID(), $subject, $body); } $messagesendflag = 0; -- cgit v1.2.3