extern uint32_t hashlittle( const void *key, size_t length, uint32_t initval);
-void display_reg(int during_login);
-
/*
* Access level definitions. This is initialized from a function rather than a
* static array so that the strings may be localized.
* 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);
}
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);
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;