Begin working new user registration into the login dialog
authorArt Cancro <ajc@citadel.org>
Fri, 28 Jan 2011 21:02:25 +0000 (16:02 -0500)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 14:10:29 +0000 (14:10 +0000)
webcit/auth.c
webcit/webcit.c
webcit/webcit.h

index 5cf1a85d91e8c4bf93b12311a6116888b1b54499..be62db44777c56cb0f22d7e84c293e7ccdc50b36 100644 (file)
@@ -386,13 +386,6 @@ void finalize_openid_login(void)
                output_headers(1, 0, 0, 0, 1, 0);
                do_template("authpopup_finished", NULL);
                end_burst();
-
-               /* FIXME make this work again.  Maybe put it in authpopup_finished?
-               if (WC->need_regi) {
-                       display_reg(1);
-               }
-               */
-
        } else {
                begin_burst();
                output_headers(1, 0, 0, 0, 1, 0);
@@ -702,7 +695,7 @@ void display_reg(int during_login)
        if (goto_config_room(Buf, &Room) != 0) {
                syslog(9, "display_reg() exiting because goto_config_room() failed\n");
                if (during_login) {
-                       do_welcome();
+                       pop_destination();
                }
                else {
                        display_main_menu();
@@ -718,7 +711,7 @@ void display_reg(int during_login)
        if (vcard_msgnum < 0L) {
                syslog(9, "display_reg() exiting because locate_user_vcard_in_this_room() failed\n");
                if (during_login) {
-                       do_welcome();
+                       pop_destination();
                }
                else {
                        display_main_menu();
@@ -727,7 +720,7 @@ void display_reg(int during_login)
        }
 
        if (during_login) {
-               do_edit_vcard(vcard_msgnum, "1", VCMsg, VCAtt, "do_welcome", USERCONFIGROOM);
+               do_edit_vcard(vcard_msgnum, "1", VCMsg, VCAtt, "pop", USERCONFIGROOM);
        }
        else {
                StrBuf *ReturnTo;
index 3c9263662a9306897ec07d7cccdc6c6ebddc566b..c99f64c4777dfee4ba2e62bb66b2f6a1ede9b598 100644 (file)
@@ -512,6 +512,12 @@ void push_destination(void) {
 void pop_destination(void) {
        wcsession *WCC = WC;
 
+       if ((WCC) && (WCC->need_regi)) {
+               WCC->need_regi = 0;
+               display_reg(1);
+               return;
+       }
+
        if ( (!WCC) || (WCC->PushedDestination == NULL) || (StrLength(WCC->PushedDestination) == 0) ) {
                do_welcome();
                return;
index 53c0157d9215e1a6052652ceb7f5b82868838b2f..33af96720eaceb5a38723f7b35d9d18bf8fa82a9 100644 (file)
@@ -661,6 +661,8 @@ int StrBuf_ServGetln(StrBuf *buf);
 int GetServerStatus(StrBuf *Line, long* FullState);
 void serv_puts(const char *string);
 void who(void);
+void push_destination(void);
+void pop_destination(void);
 
 void ajax_mini_calendar(void);
 void fmout(char *align);