Bug, quand on créé un membre, ca créé tjs un sous domaine pour lui, même si on coche pas la case.

Maintenant, ca marche ;)
This commit is contained in:
Alan Garcia 2013-03-04 15:12:56 +00:00
parent 333864cee3
commit 2693aab130
1 changed files with 8 additions and 1 deletions

View File

@ -38,10 +38,17 @@ $fields = array (
"nmail" => array ("post", "string", ""), "nmail" => array ("post", "string", ""),
"type" => array ("post", "string", ""), "type" => array ("post", "string", ""),
"create_dom_list" => array ("post", "string", ""), "create_dom_list" => array ("post", "string", ""),
"create_dom" => array ("post", "integer", 0),
"submit" => array ("post", "string", ""), "submit" => array ("post", "string", ""),
); );
getFields($fields); getFields($fields);
if ($create_dom && !empty($create_dom_list) ) {
$dom_to_create = $create_dom_list;
} else {
$dom_to_create = false;
}
if ($pass != $passconf) { if ($pass != $passconf) {
$error = _("Passwords do not match"); $error = _("Passwords do not match");
include("adm_add.php"); include("adm_add.php");
@ -49,7 +56,7 @@ if ($pass != $passconf) {
} }
// Attemp to create, exit if fail // Attemp to create, exit if fail
if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type, 0, $notes, 0, $create_dom_list, $db_server_id))) { if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type, 0, $notes, 0, $dom_to_create, $db_server_id))) {
$error=$err->errstr(); $error=$err->errstr();
include ("adm_add.php"); include ("adm_add.php");
exit; exit;