diff --git a/bureau/admin/hta_doadduser.php b/bureau/admin/hta_doadduser.php index af96b2f8..58d678d2 100644 --- a/bureau/admin/hta_doadduser.php +++ b/bureau/admin/hta_doadduser.php @@ -43,13 +43,13 @@ if ($password != $passwordconf) { exit(); } -if (!$password) { +if (empty($password)) { $error=_("Please enter a password"); include ("hta_adduser.php"); exit(); } -if (!$hta->add_user($user, $password,$dir)) { +if (!$hta->add_user($user, $password, $dir)) { $error=$err->errstr(); include ("hta_adduser.php"); } else { diff --git a/bureau/admin/hta_dodeluser.php b/bureau/admin/hta_dodeluser.php index 4a9013fd..a5270def 100644 --- a/bureau/admin/hta_dodeluser.php +++ b/bureau/admin/hta_dodeluser.php @@ -30,17 +30,42 @@ require_once("../class/config.php"); $fields = array ( - "d" => array ("post", "array", ""), + "d" => array ("post", "array", array()), "dir" => array ("post", "string", ""), + "confirm_del" => array ("post", "string", ""), ); getFields($fields); -reset($d); -if (!$hta->del_user($d,$dir)) { - $error=$err->errstr(); +if (!empty($confirm_del)) { + reset($d); + if (!$hta->del_user($d,$dir)) { + $error=$err->errstr(); + } + header ('Location: /hta_edit.php?dir='.urlencode($dir)); + exit(); } +include_once('head.php'); +?> +
+