Fix account creation (send mail) and disable domainnotify (temporary)
This commit is contained in:
parent
b5254b8c5f
commit
791d0169ac
|
@ -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 '<div class="alert alert-success" role="alert">Ajout effectué.</div>';
|
||||
#EvoLog::log("Add domain ".$domain);
|
||||
domainnotify($domain);
|
||||
} catch (Exception $e_ad) {
|
||||
print '<div class="alert alert-danger" role="alert">'.$e_ad->getMessage().'</div>';
|
||||
#EvoLog::log("Add $domain failed");
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue