Add sender id as $user_id, validate if user exists.

pull/2487/head
jmontoyaa 7 years ago
parent 520f3bd619
commit 8d6a176acd
  1. 3
      main/auth/inscription.php
  2. 21
      main/inc/lib/message.lib.php
  3. 4
      main/inc/lib/usermanager.lib.php

@ -844,7 +844,8 @@ if ($form->validate()) {
MessageManager::send_message_simple(
$bossId,
$subjectEmail,
$contentEmail
$contentEmail,
$user_id
);
}
}

@ -168,17 +168,24 @@ class MessageManager
if (!empty($result[1]) && !empty($userInfo)) {
$message[1] = '<a '.$class.' href="view_message.php?id='.$result[0].'">'.$result[2].'</a><br />';
$message[1] .= $userInfo['complete_name_with_username'];
$message[3] =
Display::url(
Display::returnFontAwesomeIcon('reply', 2),
$newMessageLink.'?re_id='.$result[0],
['title' => get_lang('ReplyToMessage') ]
);
} else {
$message[1] = '<a '.$class.' href="view_message.php?id='.$result[0].'">'.$result[2].'</a><br />';
$message[1] .= get_lang('UserUnknow');
$message[1] .= get_lang('UnknownUser');
$message[3] =
Display::url(
Display::returnFontAwesomeIcon('reply', 2),
'#',
['title' => get_lang('ReplyToMessage')]
);
}
$message[3] =
Display::url(
Display::returnFontAwesomeIcon('reply', 2),
$newMessageLink.'?re_id='.$result[0],
['title' => get_lang('ReplyToMessage') ]
).
$message[3] .=
'&nbsp;&nbsp;'.
Display::url(
Display::returnFontAwesomeIcon('share', 2),

@ -568,10 +568,10 @@ class UserManager
MessageManager::send_message_simple(
$adminId,
$subject,
$emailBody
$emailBody,
$userId
);
}
}
/* ENDS MANAGE EVENT WITH MAIL */
}

Loading…
Cancel
Save