]> git.mjollnir.org Git - moodle.git/commit
accesslib: Move check_enrolment_plugins() to complete_user_login()
authormartinlanghoff <martinlanghoff>
Wed, 14 Nov 2007 22:04:05 +0000 (22:04 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 14 Nov 2007 22:04:05 +0000 (22:04 +0000)
commit8f9e1d2c4db98ebeffcebd156991e55ca32bc82f
treeac9310f77d2337f2ec09a19384052c3c3b8ae818
parenta238e822a2c2665755175092356c38d6579b9c66
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...
lib/accesslib.php
lib/moodlelib.php