danmarsden/moodle-auth_mcae

Fatal Error: Fatal error: Class 'auth_plugin_manual' not found in /var/www/html/moodle_dev/auth/mcae/auth.php on line 31

Closed this issue · 4 comments

Hi,

I'm trying your plugin, but unfortunately I'm not able to work with it as I'm getting the above mentioned fatal error. Do you know if it's a fault on my side?
I'm using your latest version 2015112819 and my current Moodle version is Moodle 3.0.1+ (Build: 20151231)

Cheers,
Kathrin

I'm also getting the same error. I've added the following logic before the "auth_plugin_mcae" is extended in "auth/mcae/auth.php":

require_once($CFG->dirroot.'/auth/manual/auth.php');

This has fixed the problem and plugin is now working correctly. Please advise if there is a better solution for this?

Thanks

sjiep commented

I also got this error after I assigned the "mcae" as authenticator method to the user and then logged in with that user.

However, I believe you should not assign the "mcae" as authenticator method. The "mcae" runs silently in the background and on each login will assign the logged in user to the correct cohort (as configured) if this hasn't happened yet.

Authentication should still happen based on existing authentication methods or by a 'self-written' authentication plugin.

Correct me if my thinking is wrong.

I'm not sure that in the long term this plugin makes sense as an authentication plugin type - I'm guessing it was written this way initially so that the user_authenticated_hook could be used. I've just written a patch that moves the handling into the user_created and user_updated events which mean that changing a user profile or adding a new user should trigger the code. If the login event is still needed we could leverage the new events api user_loggedin event.

Doing this would mean that the plugin might be better suited as a "local" plugin or maybe an "admin_tool" plugin instead of an Authentication plugin.

looks like manual/auth.php was added a while ago - closing this one as fixed.