diff --git a/htdocs/domaine.php b/htdocs/domaine.php
index 62b171a..48587d2 100644
--- a/htdocs/domaine.php
+++ b/htdocs/domaine.php
@@ -27,14 +27,10 @@ if (!empty($_POST['domain'])) {
try {
$active = (!empty($_POST['isactive'])) ? true : false;
- $server->addDomain($domain), $active);
- domain_add($domain);
+ $server->addDomain($domain, $active);
print '
Ajout effectué.
';
- #EvoLog::log("Add domain ".$domain);
- domainnotify($domain);
} catch (Exception $e_ad) {
print ''.$e_ad->getMessage().'
';
- #EvoLog::log("Add $domain failed");
}
print "";
diff --git a/htdocs/lib/class.ldapdomain.php b/htdocs/lib/class.ldapdomain.php
index 2561c48..47902d2 100644
--- a/htdocs/lib/class.ldapdomain.php
+++ b/htdocs/lib/class.ldapdomain.php
@@ -92,13 +92,12 @@ class LdapDomain extends LdapServer {
#$info["amavisBypassSpamChecks"] = ($amavisBypassSpamChecks) ? 'TRUE' : 'FALSE';
$info["userPassword"] = LdapServer::hashPassword($password);
- if (@ldap_add($this->conn, LdapAccount::getBaseDN($this, $mail), $info)) {
- mail($name, 'Premier message',"Mail d'initialisation du compte.");
- mailnotify($info,$this->getname(),$password);
- } else {
+ if (!@ldap_add($this->conn, LdapAccount::getBaseDN($this, $mail), $info)) {
$error = ldap_error($this->conn);
throw new Exception("Erreur dans l'ajout du compte : $error");
}
+ mail($mail, 'Premier message',"Mail d'initialisation du compte.");
+ //mailnotify($info,$this->getname(),$password);
}
public function addAlias($name,$active=false,$mailaccept=array(),$maildrop=array()) {
diff --git a/htdocs/lib/class.ldapserver.php b/htdocs/lib/class.ldapserver.php
index b725482..f557fb2 100644
--- a/htdocs/lib/class.ldapserver.php
+++ b/htdocs/lib/class.ldapserver.php
@@ -108,6 +108,7 @@ class LdapServer {
$error = ldap_error($this->conn);
throw new Exception("Erreur dans l'ajout du domaine : $error");
}
+ //domainnotify($name);
}
public function delDomain($name) {