X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fuser_ops.c;h=a8f7b34233039dd41e7cc9d736fd53410c60995c;hp=473e83a80a8783c62ba938653a5e0c91599fbc5e;hb=24d1e719dd6b40e0eb4153b928b758abb17863a1;hpb=63e88e1b13b6270cfb73504e7b3ee825c343db09 diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 473e83a80..a8f7b3423 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -1,16 +1,14 @@ -/* - * Server functions which perform operations on user objects. - * - * Copyright (c) 1987-2020 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License, version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ +// Server functions which perform operations on user objects. +// +// Copyright (c) 1987-2021 by the citadel.org team +// +// This program is open source software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License, version 3. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. #include #include @@ -595,7 +593,6 @@ int CtdlLoginExistingUser(const char *trythisname) } -#ifdef HAVE_LDAP else if ((CtdlGetConfigInt("c_auth_mode") == AUTHMODE_LDAP) || (CtdlGetConfigInt("c_auth_mode") == AUTHMODE_LDAP_AD)) { /* LDAP auth mode */ @@ -621,7 +618,6 @@ int CtdlLoginExistingUser(const char *trythisname) } } -#endif else { /* native auth mode */ @@ -685,7 +681,6 @@ void do_login(void) CtdlPutUserLock(&CC->user); /* If we are using LDAP authentication, extract the user's email addresses from the directory. */ -#ifdef HAVE_LDAP if ((CtdlGetConfigInt("c_auth_mode") == AUTHMODE_LDAP) || (CtdlGetConfigInt("c_auth_mode") == AUTHMODE_LDAP_AD)) { char new_emailaddrs[512]; if (CtdlGetConfigInt("c_ldap_sync_email_addrs") > 0) { @@ -694,7 +689,6 @@ void do_login(void) } } } -#endif /* If the user does not have any email addresses assigned, generate one. */ if (IsEmptyStr(CC->user.emailaddrs)) { @@ -917,7 +911,6 @@ int CtdlTryPassword(const char *password, long len) } } -#ifdef HAVE_LDAP else if ((CtdlGetConfigInt("c_auth_mode") == AUTHMODE_LDAP) || (CtdlGetConfigInt("c_auth_mode") == AUTHMODE_LDAP_AD)) { /* LDAP auth mode */ @@ -929,7 +922,6 @@ int CtdlTryPassword(const char *password, long len) code = (-1); } } -#endif else {