CtdlUserLogout() fixed to more throroughly log the user out
authorArt Cancro <ajc@citadel.org>
Tue, 18 Jan 2011 18:25:28 +0000 (13:25 -0500)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 12:48:58 +0000 (12:48 +0000)
citadel/user_ops.c
citadel/user_ops.h

index 5e0219f53f4fd14565e61ff38164740a11c3788c..96f773f7dc82ee091d1bd313204e294f0ffbfdbb 100644 (file)
@@ -3,9 +3,9 @@
  *
  * Copyright (c) 1987-2011 by the citadel.org team
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
+ * This program is open source software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
 #include "sysdep.h"
@@ -774,15 +774,6 @@ void logged_in_response(void)
 
 
 
-/* 
- * misc things to be taken care of when a user is logged out
- */
-void logout(void)
-{
-       CtdlUserLogout();
-}
-
-
 void CtdlUserLogout(void)
 {
        CitContext *CCC = MyContext();
@@ -828,6 +819,15 @@ void CtdlUserLogout(void)
 
        /* Clear out the user record in memory so we don't behave like a ghost */
        memset(&CCC->user, 0, sizeof(struct ctdluser));
+       CCC->curr_user[0] = 0;
+       CCC->is_master = 0;
+       CCC->cs_inet_email[0] = 0;
+       CCC->cs_inet_other_emails[0] = 0;
+       CCC->cs_inet_fn[0] = 0;
+       CCC->fake_username[0] = 0;
+       CCC->fake_hostname[0] = 0;
+       CCC->fake_roomname[0] = 0;
+       
 
        /* Free any output buffers */
        unbuffer_output();
index bbddd4e885b731f3eaf0bfe6944218f5f22250a8..b057947c6d0a72828e991e465877341b304ed0ed 100644 (file)
@@ -20,8 +20,6 @@ void rebuild_usersbynumber(void);
 void cmd_user (char *cmdbuf);
 void session_startup (void);
 void logged_in_response(void);
-/* logout() is deprecated use CtdlUserLogout() instead */
-void logout (void) __attribute__ ((deprecated));
 int purge_user (char *pname);
 int create_user (const char *newusername, long len, int become_user);
 void do_login(void);