The normal way to unenrol a user (IIRC) is the grab the enrolment plugin instance and call its unenrol_user() method.
You must know about enrolment plugin instances as you enrolled them in the first place.
See lib/enrollib.php
The normal way to unenrol a user (IIRC) is the grab the enrolment plugin instance and call its unenrol_user() method.
You must know about enrolment plugin instances as you enrolled them in the first place.
See lib/enrollib.php