+ # And dummy up a session object.
+ require IkiWiki::CGI;
+ my $session=IkiWiki::cgi_getsession($cgi);
+ $session->param("name", getuser());
+ # Make sure whatever user was authed is in the
+ # userinfo db.
+ require IkiWiki::UserInfo;
+ if (! IkiWiki::userinfo_get($session->param("name"), "regdate")) {
+ IkiWiki::userinfo_setall($session->param("name"), {
+ email => "",
+ password => "",
+ regdate => time,
+ }) || error("failed adding user");
+ }
+