X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fuser_ops.c;h=5dc4790a915ac1730a88e5be299cbb0ef3bced81;hp=191582b6e602a441c9e934ca73e985cca4906275;hb=8996a310a8255f702e139f09dbb7fae697ba7841;hpb=fcec795dc7d0d125028ca1bd3a5f35b3f97b265f diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 191582b6e..5dc4790a9 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -657,8 +657,10 @@ void do_login(void) #ifdef HAVE_LDAP if ((CtdlGetConfigInt("c_auth_mode") == AUTHMODE_LDAP) || (CtdlGetConfigInt("c_auth_mode") == AUTHMODE_LDAP_AD)) { char new_emailaddrs[512]; - if (extract_email_addresses_from_ldap(CCC->ldap_dn, new_emailaddrs) == 0) { - CtdlSetEmailAddressesForUser(CCC->user.fullname, new_emailaddrs); + if (CtdlGetConfigInt("c_ldap_sync_email_addrs") > 0) { + if (extract_email_addresses_from_ldap(CCC->ldap_dn, new_emailaddrs) == 0) { + CtdlSetEmailAddressesForUser(CCC->user.fullname, new_emailaddrs); + } } } #endif