MDL-64426 core_message: fix context::instance_by_id() wrong use

This commit is contained in:
Eloy Lafuente (stronk7)
2019-01-08 23:07:22 +01:00
parent 279df86c7f
commit db729d9510
+1 -1
View File
@@ -776,7 +776,7 @@ class api {
// Name should be formatted and depends on the context the conversation resides in.
// If not set, the context is always context_user.
if (is_null($conversation->contextid)) {
$convcontext = \context_user::instance_by_id($userid);
$convcontext = \context_user::instance($userid);
} else {
$convcontext = \context::instance_by_id($conversation->contextid);
}