How to use multiple LDAP servers with Moodle 1.8

Re: How to use multiple LDAP servers with Moodle 1.8

by Andrew Lorbach -
Number of replies: 2
Hi Iñaki

Thank you so much for all your help with creating these patches. I think once I get it working it will be a massive help for our staff and students. Sorry I have to ask for help, I downloaded this patch for our moodle 3.7.3+ (I couldn't seem to get 3.7.2 anymore). I've got it almost all working I think, but when I try and test a user I get this error.

Administration: Plugins: Authentication: Test settings

Exception - Call to undefined function get_ldap_assignable_role_names()

I think it might be the same error this genteman was getting:
https://moodle.org/mod/forum/discuss.php?d=74279&parent=1489567

If it's not too much trouble would you be able to see if you could help me out.

Thank you so very much!

In reply to Andrew Lorbach

Re: How to use multiple LDAP servers with Moodle 1.8

by Chris J -
I was getting the same error message as Andrew on a new Moodle install (version 3.8) when using Iñaki's latest patch. I was able to resolve this by making a change to auth.php in the cloned ldap directory (Linux):

/var/www/html/moodle/auth/ldap2/auth.php

Perform a search (or go to line 2167) for "get_ldap_assignable_role_names()" and change it to "get_ldap2_assignable_role_names()".
Average of ratings: Useful (1)