Skip to content

Commit

Permalink
MDL-77837 core: Improve usage docs for cron_setup_user
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Apr 6, 2023
1 parent 46ea326 commit 875c1d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/sessionlib.php
Expand Up @@ -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.
Expand Down

0 comments on commit 875c1d9

Please sign in to comment.