X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fctdlproto%2Fserv_user.c;h=f0382a9c447aaf704789b48c249c9ab70b91db19;hb=0c9cb3fbc797de34635bc6748937b710a4d37bcb;hp=7d6b18c6c4e8115f8bbdb845f9660a54af9a17c6;hpb=a7ba5521416e2e2d8f84065e2f5411450c612607;p=citadel.git diff --git a/citadel/modules/ctdlproto/serv_user.c b/citadel/modules/ctdlproto/serv_user.c index 7d6b18c6c..f0382a9c4 100644 --- a/citadel/modules/ctdlproto/serv_user.c +++ b/citadel/modules/ctdlproto/serv_user.c @@ -1,7 +1,7 @@ /* * Server functions which perform operations on user objects. * - * Copyright (c) 1987-2015 by the citadel.org team + * Copyright (c) 1987-2017 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. @@ -29,11 +29,9 @@ void cmd_user(char *cmdbuf) char username[256]; int a; - CON_syslog(LOG_DEBUG, "cmd_user(%s)\n", cmdbuf); extract_token(username, cmdbuf, 0, '|', sizeof username); - CON_syslog(LOG_DEBUG, "username: %s\n", username); striplt(username); - CON_syslog(LOG_DEBUG, "username: %s\n", username); + syslog(LOG_DEBUG, "user_ops: cmd_user(%s)", username); a = CtdlLoginExistingUser(NULL, username); switch (a) { @@ -240,23 +238,19 @@ void cmd_creu(char *cmdbuf) } - /* * get user parameters */ void cmd_getu(char *cmdbuf) { - if (CtdlAccessCheck(ac_logged_in)) return; CtdlGetUser(&CC->user, CC->curr_user); - cprintf("%d 80|24|%d|\n", - CIT_OK, - (CC->user.flags & US_USER_SET) - ); + cprintf("%d 80|24|%d|\n", CIT_OK, (CC->user.flags & US_USER_SET)); } + /* * set user parameters */ @@ -423,7 +417,7 @@ void cmd_gnur(char *argbuf) return; } - if ((CitControl.MMflags & MM_VALID) == 0) { + if ((CtdlGetConfigInt("MMflags") & MM_VALID) == 0) { cprintf("%d There are no unvalidated users.\n", CIT_OK); return; } @@ -451,13 +445,12 @@ void cmd_gnur(char *argbuf) */ begin_critical_section(S_CONTROL); - get_control(); - CitControl.MMflags = CitControl.MMflags & (~MM_VALID); - put_control(); + int flags; + flags = CtdlGetConfigInt("MMflags"); + flags = flags & (~MM_VALID); + CtdlSetConfigInt("MMflags", flags); end_critical_section(S_CONTROL); cprintf("%d *** End of registration.\n", CIT_OK); - - } @@ -533,9 +526,9 @@ void cmd_chek(char *argbuf) regis = 1; if (CC->user.axlevel >= AxAideU) { - get_control(); - if (CitControl.MMflags & MM_VALID) + if (CtdlGetConfigInt("MMflags") & MM_VALID) { vali = 1; + } } /* check for mail */