Skip to content

Commit

Permalink
Merge pull request #862 from catalyst/fix-function-namespace
Browse files Browse the repository at this point in the history
fix: core function call, due to namespace
  • Loading branch information
Peterburnett authored Feb 8, 2024
2 parents 0a7d793 + 13f868f commit 64e587a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions classes/local/step/update_user_trait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

namespace tool_dataflows\local\step;

defined('MOODLE_INTERNAL') || die();

require_once($CFG->dirroot . '/user/lib.php');
require_once($CFG->dirroot . '/user/profile/lib.php');

/**
* Update user using core api
*
Expand Down Expand Up @@ -85,8 +90,8 @@ public function execute($input = null) {
unset($userobject->auth);

// Update user fields using core api.
user_update_user($userobject, false, false);
profile_save_data($userobject);
\user_update_user($userobject, false, false);
\profile_save_data($userobject);

return $input;
}
Expand Down

0 comments on commit 64e587a

Please sign in to comment.