Skip to content
Snippets Groups Projects
Commit 4749868f authored by Alexander Bias's avatar Alexander Bias
Browse files

Bugfix: Login via email for first-time LDAP logins did not work if multiple...

Bugfix: Login via email for first-time LDAP logins did not work if multiple LDAP contexts were configured
parent ce8d0e6e
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,10 @@ moodle-auth_ldap_syncplus
Changes
-------
### Unreleased
* 2018-02-07 - Bugfix: Login via email for first-time LDAP logins did not work if multiple LDAP contexts were configured; Credits to derhelge.
### v3.4-r2
* 2018-02-07 - Add forgotten sync_roles task definition
......
......@@ -517,8 +517,8 @@ class auth_plugin_ldap_syncplus extends auth_plugin_ldap {
$ldapresult = ldap_list($ldapconnection, $context, $filter, array($authplugin->config->user_attribute));
}
// If there is no LDAP result, continue with next context.
if (!$ldapresult) {
// If there is no LDAP result or if the user was not found in this context, continue with next context.
if (!$ldapresult || ldap_count_entries($ldapconnection, $ldapresult) == 0) {
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment