mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-65093 core_message: deprecate can_post_message()
This commit is contained in:
parent
f622ee97e3
commit
06d046c1ff
7 changed files with 237 additions and 16 deletions
|
@ -189,7 +189,7 @@ class core_message_external extends external_api {
|
|||
|
||||
// TODO MDL-31118 performance improvement - edit the function so we can pass an array instead userid
|
||||
// Check if the recipient can be messaged by the sender.
|
||||
if ($success && !\core_message\api::can_post_message($tousers[$message['touserid']], $USER)) {
|
||||
if ($success && !\core_message\api::can_send_message($tousers[$message['touserid']]->id, $USER->id)) {
|
||||
$success = false;
|
||||
$errormessage = get_string('usercantbemessaged', 'message', fullname(\core_user::get_user($message['touserid'])));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue