(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_user.ml,v 1.13 2006/07/26 16:34:18 rich Exp $
+ * $Id: edit_user.ml,v 1.14 2006/12/06 09:46:57 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 original_name <> name then (
if name = "" then (
error ~back_button:true ~title:"Bad username"
- dbh hostid q "The username you gave is empty.";
+ r dbh hostid q "The username you gave is empty.";
return ()
);
(match rows with
| [Some 1l] ->
error ~back_button:true ~title:"Username already taken"
- dbh hostid q
+ r dbh hostid q
("That username has already been taken by another user.");
return ()
| _ -> ()
(match can_manage_users, self with
| false, User (id, _, _, _) when id = userid ->
error ~back_button:true ~title:"Remove manage users from self"
- dbh hostid q
+ r dbh hostid q
("You tried to remove 'Manage users' permission from yourself. " ^
"You can't do this. You'll have to do it from another " ^
"user account.");
let buttons = [ ok_button "/_users" ] in
ok ~buttons ~title:"Saved"
- dbh hostid q "Changes were saved."
+ r dbh hostid q "Changes were saved."
let () =
register_script ~restrict:[CanManageUsers] run