(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: change_password.ml,v 1.5 2006/03/27 18:09:46 rich Exp $
+ * $Id: change_password.ml,v 1.6 2006/12/06 09:46:56 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 not old_password_ok then (
error ~title:"Bad password"
~back_button:true
- dbh hostid q "The password you gave is wrong.";
+ r dbh hostid q "The password you gave is wrong.";
return ()
);
if password1 = "" || password2 = "" then (
error ~back_button:true ~title:"Bad password"
- dbh hostid q "The password you gave is empty.";
+ r dbh hostid q "The password you gave is empty.";
return ()
);
if password1 <> password2 then (
error ~back_button:true ~title:"Passwords don't match"
- dbh hostid q "The two passwords you gave aren't identical.";
+ r dbh hostid q "The two passwords you gave aren't identical.";
return ()
);
let buttons = [ ok_button "/" ] in
ok ~buttons ~title:"Password changed"
- dbh hostid q "The password was changed."
+ r dbh hostid q "The password was changed."
let () =
register_script ~anonymous:false run