If anonymous account creation isn't allowed, then don't print
[cocanwiki.git] / scripts / page.ml
index 7001a08..d1e8b09 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: page.ml,v 1.46 2006/07/26 13:11:25 rich Exp $
+ * $Id: page.ml,v 1.47 2006/07/26 13:19:49 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
@@ -299,6 +299,11 @@ let run r (q : cgi) dbh hostid
           t#conditional "user_logged_in" true;
           t#set "username" username);
 
+    (* Can anonymous users create accounts?  If not them we don't
+     * want to offer to create accounts for them.
+     *)
+    t#conditional "create_account_anon" host.create_account_anon;
+
     (* If logged in, we want to update the recently_visited table. *)
     if pageid <> None then (
       match user with