General developer forum

Event not working correctly.

 
Picture of George Lovejoy
Event not working correctly.
 

Hi,


Im trying to use the \core\event\user_updated event to do some custom updates every time a users profile is updated. This seems to work fine when going into a specific users profile and making updates there but when using the upload users function it seems to cause an issue. The user upload seems to update one user, trigger the event and then show the results page of the one user and then almost instantly redirects away back to browse users.Even when the handling function is empty this still happens ( Code below ). It works fine If I remove the event triggering code from the upload users script.

public static function user_created(\core\event\user_created $event) {

  return true;

}



 
Average of ratings: -
Picture of George Lovejoy
Re: Event not working correctly.
 

This is moodle 3.4.1. I was originally using a custom script for the user upload however I have removed this as well as removed the event altogether and still have the same problem.

 
Average of ratings: -