* modal/ajax version of 'new user' (username and password)
*/
void ajax_login_newuser(void) {
- StrBuf *Buf = NewStrBuf();
+ StrBuf *NBuf = NewStrBuf();
+ StrBuf *SBuf = NewStrBuf();
serv_printf("NEWU %s", bstr("name"));
- StrBuf_ServGetln(Buf);
- if (GetServerStatus(Buf, NULL) == 2) {
+ StrBuf_ServGetln(NBuf);
+ if (GetServerStatus(NBuf, NULL) == 2) {
+ become_logged_in(sbstr("name"), sbstr("pass"), NBuf);
serv_printf("SETP %s", bstr("pass"));
- StrBuf_ServGetln(Buf);
- if (GetServerStatus(Buf, NULL) == 2) {
- become_logged_in(sbstr("name"), sbstr("pass"), Buf);
- }
+ StrBuf_ServGetln(SBuf);
}
/* The client is expecting to read back a citadel protocol response */
- wc_printf("%s", ChrPtr(Buf));
- FreeStrBuf(&Buf);
+ wc_printf("%s", ChrPtr(NBuf));
+ FreeStrBuf(&NBuf);
+ FreeStrBuf(&SBuf);
}
*/
/*
+ * FIXME make this work again!!!!
+ *
else if (!strcasecmp(ChrPtr(result), "verify_only")) {
putbstr("__claimed_id", claimed_id);
claimed_id = NULL;
output_headers(1, 0, 0, 0, 1, 0);
do_template("authpopup_finished", NULL);
end_burst();
-
- /* FIXME make all this crap work again
- if (WC->need_regi) {
- display_reg(1);
- } else {
- do_welcome();
- }
- */
-
} else {
- /* FIXME do something prettier here? */
begin_burst();
output_headers(1, 0, 0, 0, 1, 0);
wc_printf("<html><body>");
- wc_printf("error");
+ wc_printf(_("An error has occurred.")); /* FIXME do something prettier here */
wc_printf("</body></html>");
end_burst();
}
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();
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();
}
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;