mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-11399 make sure user context exists
This commit is contained in:
parent
0c4807abba
commit
2304f62967
1 changed files with 3 additions and 0 deletions
|
@ -543,6 +543,9 @@ if ($formdata = $mform->is_cancelled()) {
|
||||||
// save custom profile fields data
|
// save custom profile fields data
|
||||||
profile_save_data($user);
|
profile_save_data($user);
|
||||||
|
|
||||||
|
// make sure user context exists
|
||||||
|
get_context_instance(CONTEXT_PERSONAL, $user->id);
|
||||||
|
|
||||||
if ($bulk == 1 or $bulk == 3) {
|
if ($bulk == 1 or $bulk == 3) {
|
||||||
if (!in_array($user->id, $SESSION->bulk_susers)) {
|
if (!in_array($user->id, $SESSION->bulk_susers)) {
|
||||||
$SESSION->bulk_susers[] = $user->id;
|
$SESSION->bulk_susers[] = $user->id;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue