X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fedit_user.ml;h=234c5a6d579695e2ce291966fd38c6ec28f5727b;hb=ec0b2fe822bac60e194044fdb7092156705e4595;hp=2f861c7e762ab8d63b3bcc1f91a7b1da8f7ba709;hpb=6eacefcb7258db7b56fe796af84961cafac90eac;p=cocanwiki.git diff --git a/scripts/edit_user.ml b/scripts/edit_user.ml index 2f861c7..234c5a6 100644 --- a/scripts/edit_user.ml +++ b/scripts/edit_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: edit_user.ml,v 1.7 2004/10/11 14:13:04 rich Exp $ + * $Id: edit_user.ml,v 1.8 2004/10/23 15:00:14 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 @@ -66,10 +66,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ self = sth#execute [`String name; `Int hostid; `Int userid] ); - (* Change email address and permissions. *) - let email = trim (q#param "email") in - let email = if email = "" then `Null else `String email in - + (* Change permissions. *) let can_edit = q#param_true "can_edit" in let can_manage_users = q#param_true "can_manage_users" in let can_manage_contacts = q#param_true "can_manage_contacts" in @@ -87,14 +84,14 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ self = return () | _ -> ()); - let sth = dbh#prepare_cached "update users set email = ?, + let sth = dbh#prepare_cached "update users set can_edit = ?, can_manage_users = ?, can_manage_contacts = ?, can_manage_site = ?, can_edit_global_css = ?, can_import_mail = ? where hostid = ? and id = ?" in - sth#execute [email; `Bool can_edit; `Bool can_manage_users; + sth#execute [`Bool can_edit; `Bool can_manage_users; `Bool can_manage_contacts; `Bool can_manage_site; `Bool can_edit_global_css; `Bool can_import_mail; `Int hostid; `Int userid];