X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fcreate_user.ml;h=5f6be277719de7bd0be62d67fae443e294590aa9;hb=6b0b6830a2e784eee99dcd1b1a3cb8b44e27c765;hp=2e08209613f8b9c73b77de562302f90c850e6421;hpb=3da6ded17ea2cca64328e5f3ea8903cd15103bc2;p=cocanwiki.git diff --git a/scripts/create_user.ml b/scripts/create_user.ml index 2e08209..5f6be27 100644 --- a/scripts/create_user.ml +++ b/scripts/create_user.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * 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 @@ -36,13 +36,13 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = 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 @@ -64,7 +64,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = sth#fetch1 (); error ~back_button:true ~title:"Username already taken" q "Someone has already taken that username."; - raise CgiExit + return () with Not_found -> ());