]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/CGI.pm
Needs review and a little help.
[git.ikiwiki.info.git] / IkiWiki / CGI.pm
index 6a04decb617571c9a8f6ea6e206663f177bd24de..5baa6c1798ef02e1f45680daa032da17674fafb0 100644 (file)
@@ -131,7 +131,7 @@ sub needsignin ($$) {
 
        if (! defined $session->param("name") ||
            ! userinfo_get($session->param("name"), "regdate")) {
-               $session->param(postsignin => $ENV{QUERY_STRING});
+               $session->param(postsignin => $q->query_string);
                cgi_signin($q, $session);
                cgi_savesession($session);
                exit;
@@ -429,7 +429,7 @@ sub cgi (;$$) {
                        # userinfo db.
                        if (! userinfo_get($session->param("name"), "regdate")) {
                                userinfo_setall($session->param("name"), {
-                                       email => "",
+                                       email => defined $session->param("email") ? $session->param("email") : "",
                                        password => "",
                                        regdate => time,
                                }) || error("failed adding user");