Commit e128d1f5 authored by Nigel McNie's avatar Nigel McNie
Browse files

Use the new message sending function to send the message between users, this...

Use the new message sending function to send the message between users, this makes sure that account settings are respected
parent 7cf9892e
......@@ -400,13 +400,7 @@ function messageform_submit(Pieform $form, $values) {
global $USER, $user;
try {
activity_occurred('usermessage',
array(
'userto' => $user->id,
'userfrom' => $USER->id,
'message' => $values['body'],
)
);
send_user_message($user, $values['body']);
$form->json_reply(PIEFORM_OK, get_string('messagesent'));
}
catch (InvalidException $_e) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment