MDL-77837 core: Improve usage docs for cron_setup_user

This commit is contained in:
Andrew Nicols 2023-04-06 16:27:38 +08:00
parent 44d734147a
commit 202718f968

View file

@ -170,7 +170,11 @@ function get_moodle_cookie() {
/**
* Sets up current user and course environment (lang, etc.) in cron.
* Do not use outside of cron script!
* Note: This function is intended only for use in:
* - the cron runner scripts
* - individual tasks which extend the adhoc_task and scheduled_task classes
* - unit tests related to tasks
* - other parts of the cron/task system
*
* @param stdClass $user full user object, null means default cron user (admin),
* value 'reset' means reset internal static caches.