MDL-19925 adding events to upload users scripts
This commit is contained in:
@@ -499,6 +499,8 @@ if ($formdata = $mform->is_cancelled()) {
|
||||
$usersupdated++;
|
||||
// save custom profile fields data from csv file
|
||||
profile_save_data($existinguser);
|
||||
|
||||
events_trigger('user_updated', $existinguser);
|
||||
}
|
||||
|
||||
if ($bulk == 2 or $bulk == 3) {
|
||||
@@ -564,6 +566,8 @@ if ($formdata = $mform->is_cancelled()) {
|
||||
// make sure user context exists
|
||||
get_context_instance(CONTEXT_USER, $user->id);
|
||||
|
||||
events_trigger('user_created', $user);
|
||||
|
||||
if ($bulk == 1 or $bulk == 3) {
|
||||
if (!in_array($user->id, $SESSION->bulk_users)) {
|
||||
$SESSION->bulk_users[] = $user->id;
|
||||
|
||||
Reference in New Issue
Block a user