(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
*
* 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
*
* 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
sth#fetch1 ();
error ~back_button:true ~title:"Username already taken"
q ("That username has already been taken by another user.");
sth#fetch1 ();
error ~back_button:true ~title:"Username already taken"
q ("That username has already been taken by another user.");
let can_manage_contacts = q#param_true "can_manage_contacts" in
let can_manage_site = q#param_true "can_manage_site" in
let can_edit_global_css = q#param_true "can_edit_global_css" in
let can_manage_contacts = q#param_true "can_manage_contacts" in
let can_manage_site = q#param_true "can_manage_site" in
let can_edit_global_css = q#param_true "can_edit_global_css" in
(* Trying to remove manage users permission from self? *)
(match can_manage_users, self with
(* Trying to remove manage users permission from self? *)
(match can_manage_users, self with
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.");
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 sth = dbh#prepare_cached "update users set email = ?,
can_edit = ?, can_manage_users = ?,
can_manage_contacts = ?,
can_manage_site = ?,
| _ -> ());
let sth = dbh#prepare_cached "update users set email = ?,
can_edit = ?, can_manage_users = ?,
can_manage_contacts = ?,
can_manage_site = ?,
where hostid = ? and id = ?" in
sth#execute [email; `Bool can_edit; `Bool can_manage_users;
`Bool can_manage_contacts; `Bool can_manage_site;
where hostid = ? and id = ?" in
sth#execute [email; `Bool can_edit; `Bool can_manage_users;
`Bool can_manage_contacts; `Bool can_manage_site;