-
New Feature
-
Resolution: Fixed
-
Minor
-
3.1.11, 3.2.8, 3.3.2, 3.3.5, 3.4.2, 3.5.5, 3.6, 3.7
-
MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
-
MOODLE_37_STABLE
-
We would like to introduce a hook that will be executed before the end of the require_login function.
'after_require_login' will allow you it intercept the page request and potentially redirect elsewhere, or perform any business logic.
This enables whole classes of features to be added by plugins cleanly. Some use cases where we have wanted this and hacked around it in the past:
- replacing the sitepolicy feature with a more robust / advanced version
- augmenting the 'user fully setup' workflow to add more steps but outside their profile editing page
- adding extra layers of checks, eg an ip address check but doing this across whole courses instead of at the sitelevel which is too coarse, or at the activity level which is too fine.
- enforcing various types of course visibility dependencies, eg 'before you can do course X you need to complete course Y'
- has been marked as being related by
-
MDL-58562 New callbacks: Refactor sitepolicy into callbacks and plugin
-
- Closed
-