mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
accesslib: Move check_enrolment_plugins() to complete_user_login()
... where it belongs ;-) load_all_capabiloties() gets called at several points where we don't want to be re-querying the enrolment backends. It needs to be called before load_all_capabilities() and only by callers that are setting up a logon session. Those callers need to be calling complete_user_login() anyway, as they need to set the Moodle cookie, log the logon action, etc. In fact, those callers duplicate a lot of that code already. The callers that don't duplicate code for the login are actually the cases where the backend enrolment plugins should not be queried. To be followed by callers cleanup...
This commit is contained in:
parent
a238e822a2
commit
8f9e1d2c4d
2 changed files with 7 additions and 3 deletions
|
@ -3039,6 +3039,9 @@ function complete_user_login($user) {
|
|||
}
|
||||
set_login_session_preferences();
|
||||
|
||||
// Call enrolment plugins
|
||||
check_enrolment_plugins($user);
|
||||
|
||||
/// This is what lets the user do anything on the site :-)
|
||||
load_all_capabilities();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue