users added during imsenterprise enrolment can't authenticate

users added during imsenterprise enrolment can't authenticate

by Jo Matthews -
Number of replies: 0

using moodle 2.4.3

In our moodle site we have mnet enabled to allow our users to sso from moodle to mahara. This works well. Users login to moodle and are authenticated against ldap so we have both ldap and mnet enabled. However, since enabling mnet, I've noticed that users created via the imsenterprise plugin have their auth field in the mdl_user table set to 'ldap,mnet'. When these users try to login to moodle, they receive an error message 'Invalid login, please try again'. As a site admin, if I try and view their profile, the following error is displayed:

authentication plugin ldap,mnet not found.

More information about this error
Debug info:
Error code: authpluginnotfound
Stack trace:

    line 476 of /lib/setuplib.php: moodle_exception thrown
    line 3732 of /lib/moodlelib.php: call to print_error()
    line 3932 of /lib/navigationlib.php: call to get_auth_plugin()
    line 3787 of /lib/navigationlib.php: call to settings_navigation->generate_user_settings()
    line 3219 of /lib/navigationlib.php: call to settings_navigation->load_user_settings()
    line 701 of /lib/pagelib.php: call to settings_navigation->initialise()
    line 717 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
    line 137 of /user/profile.php: call to moodle_page->__get()
   

I can fix it by running the following query:

update mdl_user set auth='ldap' where uath like "%mnet%" but the next time the imsenterprise  import is run, I'll get new users created with mdl_user.auth='ldap,mnet'.

For now I've hacked the code in enrol/imsenterprise/lib.php and changed:

$person->auth = $CFG->auth;
to

$person->auth = "ldap";

So that new users get created with auth='ldap'.

Has anyone else experienced this problem? Could it be that I haven't set something up correctly?


 

Average of ratings: -