- my $user=getuser();
- $session->param("name", $user);
- $ENV{REMOTE_ADDR}='unknown' unless exists $ENV{REMOTE_ADDR};
-
- lockwiki();
- loadindex();
-
+ $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");
+ }
+