}
-void display_openid_name_request(const StrBuf *claimed_id, const StrBuf *username)
-{
- StrBuf *Buf = NULL;
-
- output_headers(1, 1, 2, 0, 0, 0);
- wc_printf("<div id=\"login_screen\">\n");
-
- Buf = NewStrBufPlain(NULL, StrLength(claimed_id));
- StrEscAppend(Buf, claimed_id, NULL, 0, 0);
- svprintf(HKEY("VERIFIED"), WCS_STRING, _("Your OpenID <tt>%s</tt> was successfully verified."),
- ChrPtr(Buf));
- SVPutBuf("CLAIMED_ID", Buf, 0);
-
-
- if (StrLength(username) > 0) {
- Buf = NewStrBufPlain(NULL, StrLength(username));
- StrEscAppend(Buf, username, NULL, 0, 0);
- svprintf(HKEY("REASON"), WCS_STRING,
- _("However, the user name '%s' conflicts with an existing user."),
- ChrPtr(Buf));
- FreeStrBuf(&Buf);
- }
- else {
- svput("REASON", WCS_STRING, "");
- }
-
- svput("ACTION_REQUESTED", WCS_STRING, _("Please specify the user name you would like to use."));
-
- svput("USERNAME_BOX", WCS_STRING, _("User name:"));
- svput("NEWUSER_BUTTON", WCS_STRING, _("New User"));
- svput("EXIT_BUTTON", WCS_STRING, _("Exit"));
-
- svprintf(HKEY("BOXTITLE"), WCS_STRING, _("%s - powered by <a href=\"http://www.citadel.org\">Citadel</a>"),
- ChrPtr(WC->serv_info->serv_humannode));
-
- do_template("openid_manual_create", NULL);
- wDumpContent(2);
-}
-
/* Initialize the session
do_welcome();
}
} else {
- display_openid_name_request(sbstr("openid_url"), sbstr("name"));
+ const StrBuf *Buf;
+
+ putbstr("__claimed_id", NewStrBufDup(sbstr("openid_url")));
+ Buf = sbstr("name");
+ if (StrLength(Buf) > 0)
+ putbstr("__username", NewStrBufDup(Buf));
+ begin_burst();
+ do_template("openid_manual_create", NULL);
+ end_burst();
}
}
*/
else if (!strcasecmp(ChrPtr(result), "verify_only")) {
- display_openid_name_request(claimed_id, username);
+ putbstr("__claimed_id", claimed_id);
+ claimed_id = NULL;
+ if (StrLength(username) > 0) {
+ putbstr("__username", username);
+ username = NULL;
+ }
+ begin_burst();
+ do_template("openid_manual_create", NULL);
+ end_burst();
}
/* Did we manage to log in? If so, continue with the normal flow... */
- if (WC->logged_in) {
+ else if (WC->logged_in) {
if (WC->need_regi) {
display_reg(1);
} else {
/* FIXME: this is to suppress the iconbar displaying, because we aren't
actually logged out yet */
WCC->logged_in = 0;
-
+
/** Calling output_headers() this way causes the cookies to be un-set */
output_headers(1, 1, 0, 1, 0, 0);
wc_printf("<div class=\"box\">");
wc_printf("<div class=\"boxlabel\">");
wc_printf(_("Log off"));
- wc_printf("</div><div class=\"boxcontent\">");
+ wc_printf("</div><div class=\"boxcontent\">");
serv_puts("MESG goodbye");
serv_getln(buf, sizeof buf);
if (WCC->serv_sock >= 0) {
if (buf[0] == '1') {
- fmout("CENTER");
+ fmout("'CENTER'");
} else {
wc_printf("Goodbye\n");
}
"this problem to your system administrator.")
);
wc_printf("<a href=\"http://www.citadel.org/doku.php/"
- "faq:mastering_your_os:net#netstat\">%s</a>",
+ "faq:mastering_your_os:net#netstat\">%s</a>",
_("Read More..."));
}
wc_printf("</a></span>");
*/
- wc_printf("</div></div></div></div>\n");
+ wc_printf("</div></div></div>\n");
wDumpContent(2);
end_webcit_session();
}