better error messages if ldap_add() fails
This commit is contained in:
parent
e00ffb4cc0
commit
d1541119ad
|
@ -275,10 +275,10 @@ elseif ($_POST['sub_save']) {
|
|||
if ($_POST['dom_nextUserRID']) $attr['sambaNextUserRid'] = $_POST['dom_nextUserRID'];
|
||||
$attr['sambaAlgorithmicRidBase'] = $_POST['dom_RIDbase'];
|
||||
// write to LDAP
|
||||
if (ldap_add($_SESSION['ldap']->server(), $DN, $attr)) {
|
||||
if (@ldap_add($_SESSION['ldap']->server(), $DN, $attr)) {
|
||||
StatusMessage("INFO", "Domain has been created.", $DN);
|
||||
}
|
||||
else StatusMessage("ERROR", "", "Failed to add domain!");
|
||||
else StatusMessage("ERROR", "", "Failed to add domain!" . "\n<br>" . ldap_error($_SESSION['ldap']->server()));
|
||||
}
|
||||
echo "<p> </p>\n";
|
||||
echo "<p><a href=\"lists/listdomains.php\">" . _("Back to domain list") . "</a></p>\n";
|
||||
|
|
Loading…
Reference in New Issue