mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 18:36:42 +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
|
@ -56,9 +56,7 @@ if ($userid) {
|
|||
}
|
||||
|
||||
if ($userid) {
|
||||
$recipient = new stdClass();
|
||||
$recipient->id = $userid;
|
||||
if (!\core_message\api::can_post_message($recipient)) {
|
||||
if (!\core_message\api::can_send_message($userid, $USER->id)) {
|
||||
throw new moodle_exception('Can not contact user');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue