From 6a59fb210fde5428b23b55027ab223ead5024112 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 28 Jan 2011 16:02:25 -0500 Subject: [PATCH] Begin working new user registration into the login dialog --- webcit/auth.c | 13 +++---------- webcit/webcit.c | 6 ++++++ webcit/webcit.h | 2 ++ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/webcit/auth.c b/webcit/auth.c index 5cf1a85d9..be62db447 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -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; diff --git a/webcit/webcit.c b/webcit/webcit.c index 3c9263662..c99f64c47 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -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; diff --git a/webcit/webcit.h b/webcit/webcit.h index 53c0157d9..33af96720 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -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); -- 2.30.2