X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Flogin_form.ml;h=ec71c355d37f24a3c93be21215f311ab46ba7264;hb=288535f82bf4a5d944536bd0790a54a5f8fb4363;hp=dfef268adc23bf43240174e2116f385654ad19cb;hpb=11b93485a29771f4d826c50d9efc6d3607dfa50f;p=cocanwiki.git diff --git a/scripts/login_form.ml b/scripts/login_form.ml index dfef268..ec71c35 100644 --- a/scripts/login_form.ml +++ b/scripts/login_form.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: login_form.ml,v 1.4 2004/09/09 12:21:22 rich Exp $ + * $Id: login_form.ml,v 1.5 2004/10/15 12:47:18 rich Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,6 +40,9 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = template#set "redirect" redirect ); + let username = try q#param "username" with Not_found -> "" in + template#set "username" username; + let sth = dbh#prepare_cached "select create_account_anon from hosts where id = ?" in sth#execute [`Int hostid];