Skip to content

Instantly share code, notes, and snippets.

@andrewnicols
Last active December 22, 2015 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewnicols/75ef940135128eae2b22 to your computer and use it in GitHub Desktop.
Save andrewnicols/75ef940135128eae2b22 to your computer and use it in GitHub Desktop.
<?php
define("CLI_SCRIPT", true);
require_once('config.php');
$user = $DB->get_record('user', ['id' => 2634]);
$enabled = enrol_get_plugins(true);
foreach($enabled as $enrol) {
$enrol->sync_user_enrolments($user);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment