I'm trying to write a query to unenrol users with a special role attached to them (in addition to their regular one) and in the /enrol/locallib.php, there was reference to "$instancessql" in some of it's functions.
What is this for?
line 205 ....
SELECT DISTINCT $ufields, ul.timeaccess AS lastseen
FROM {user} u
JOIN {user_enrolments} ue ON (ue.userid = u.id AND ue.enrolid $instancessql)
JOIN {enrol} e ON (e.id = ue.enrolid)
LEFT JOIN {user_lastaccess} ul ON (ul.courseid = e.courseid AND ul.userid = u.id)
allow where can I find the function "allow_unenrol_user"?
Thanks