if (StrLength(username) > 0) {
Buf = NewStrBufPlain(NULL, StrLength(username));
- StrEscAppend(Buf, claimed_id, NULL, 0, 0);
+ StrEscAppend(Buf, username, NULL, 0, 0);
svprintf(HKEY("REASON"), WCS_STRING,
_("However, the user name '%s' conflicts with an existing user."),
ChrPtr(Buf));
Buf = NewStrBuf();
serv_puts("CHEK");
StrBuf_ServGetln(Buf);
- lprintf(9, "%s:%d CHEK server reply: %s\n", __FILE__, __LINE__, ChrPtr(Buf));
if (GetServerStatus(Buf, NULL) == 2) {
const char *pch;
void display_reg(int during_login)
{
StrBuf *Buf;
- message_summary *VCMsg;
- wc_mime_attachment *VCAtt;
+ message_summary *VCMsg = NULL;
+ wc_mime_attachment *VCAtt = NULL;
long vcard_msgnum;
Buf = NewStrBuf();
if (goto_config_room(Buf) != 0) {
- if (during_login) do_welcome();
- else display_main_menu();
+ lprintf(9, "display_reg() exiting because goto_config_room() failed\n");
+ if (during_login) {
+ do_welcome();
+ }
+ else {
+ display_main_menu();
+ }
FreeStrBuf(&Buf);
return;
}
FreeStrBuf(&Buf);
vcard_msgnum = locate_user_vcard_in_this_room(&VCMsg, &VCAtt);
if (vcard_msgnum < 0L) {
- if (during_login) do_welcome();
- else display_main_menu();
+ lprintf(9, "display_reg() exiting because locate_user_vcard_in_this_room() failed\n");
+ if (during_login) {
+ do_welcome();
+ }
+ else {
+ display_main_menu();
+ }
return;
}
do_edit_vcard(vcard_msgnum, "1", VCMsg, VCAtt, "do_welcome", USERCONFIGROOM);
}
else {
- do_edit_vcard(vcard_msgnum, "1", VCMsg, VCAtt, "display_main_menu", USERCONFIGROOM);
+ StrBuf *ReturnTo;
+ ReturnTo = NewStrBufPlain(HKEY("display_main_menu?gotofirst="));
+ StrBufAppendBuf(ReturnTo, WC->wc_roomname, 0);
+ do_edit_vcard(vcard_msgnum, "1", VCMsg, VCAtt, ChrPtr(ReturnTo), USERCONFIGROOM);
+ FreeStrBuf(&ReturnTo);
}
+ /* FIXME - don't we have to free VCMsg and VCAtt ?? */
}
return (WCC != NULL)? (WCC->is_room_aide == 0) : 0;
}
+
int ConditionalIsLoggedIn(StrBuf *Target, WCTemplputParams *TP)
{
wcsession *WCC = WC;
return (WCC != NULL)? (WCC->logged_in == 0) : 0;
}
+
+
int ConditionalRoomAcessDelete(StrBuf *Target, WCTemplputParams *TP)
{
wcsession *WCC = WC;
}
+void _display_openid_login(void) {
+ display_openid_login(NULL);
+}
+
+
+void _display_reg(void) {
+ display_reg(0);
+}
-void _display_openid_login(void) {display_openid_login(NULL);}
-void _display_reg(void) {display_reg(0);}
void Header_HandleAuth(StrBuf *Line, ParsedHttpHdrs *hdr)
{
StrBufAppendBufPlain(hdr->HR.plainauth, HKEY(":"), 0);
StrBufAppendBuf(hdr->HR.plainauth, hdr->HR.user_agent, 0);
hdr->HR.SessionKey = hashlittle(SKEY(hdr->HR.plainauth), 89479832);
-
+/*
+ lprintf(1, "CheckAuthBasic: calculated sessionkey %ld\n",
+ hdr->HR.SessionKey);
+*/
}
void GetAuthBasic(ParsedHttpHdrs *hdr)