MDL-50824 message/externallib.php: Fix get_string call
This fixes the get_string call by adding the intended recipient's fullname as the third argument when a user tries to message the recipient, the recipient is blocking non-contacts from messaging them, and the user is not in the recipient's contact list.
This commit is contained in:
@@ -137,7 +137,8 @@ class core_message_external extends external_api {
|
||||
if ($success && empty($contactlist[$message['touserid']]) && !empty($blocknoncontacts)) {
|
||||
// The user isn't a contact and they have selected to block non contacts so this message won't be sent.
|
||||
$success = false;
|
||||
$errormessage = get_string('userisblockingyounoncontact', 'message');
|
||||
$errormessage = get_string('userisblockingyounoncontact', 'message',
|
||||
fullname(core_user::get_user($message['touserid'])));
|
||||
}
|
||||
|
||||
//now we can send the message (at least try)
|
||||
|
||||
Reference in New Issue
Block a user