(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: create_user.ml,v 1.2 2004/09/22 10:19:26 rich Exp $
+ * $Id: create_user.ml,v 1.3 2004/09/23 11:56:47 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
if username = "" || password1 = "" || password2 = "" then (
error ~back_button:true ~title:"Bad username or password"
q "The username or password you gave is empty.";
- raise CgiExit
+ return ()
);
if password1 <> password2 then (
error ~back_button:true ~title:"Passwords don't match"
q "The two passwords you gave aren't identical.";
- raise CgiExit
+ return ()
);
let password = password1 in
sth#fetch1 ();
error ~back_button:true ~title:"Username already taken"
q "Someone has already taken that username.";
- raise CgiExit
+ return ()
with
Not_found -> ());