Commit 312789c1 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

added check so messages can't be sent to deleted users

parent 360a9c77
......@@ -34,7 +34,7 @@ safe_require('search', 'internal');
$id = param_integer('id');
$returnto = param_alpha('returnto', 'myfriends');
$user = get_record('usr', 'id', $id);
$user = get_record('usr', 'id', $id, 'deleted', 0);
if (!$user || !can_send_message($USER, $id)) {
throw new AccessDeniedException(get_string('cantmessageuser', 'group'));
......
Markdown is supported
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