Commit 5bf7849d authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #3880 post_remove is now only called if ldap_remove has no error

parent 689dffab
......@@ -515,8 +515,9 @@ class simplePlugin extends plugin
$this->attrs = $this->templateSaveAttrs();
$this->saved_attributes = array();
}
$this->ldap_remove();
$this->post_remove();
if ($this->ldap_remove()) {
$this->post_remove();
}
}
protected function prepare_remove ()
......@@ -538,8 +539,11 @@ class simplePlugin extends plugin
$this->ldap_error = $ldap->get_error();
if (!$ldap->success()) {
if ($ldap->success()) {
return TRUE;
} else {
msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()), LDAP_ERROR);
return FALSE
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment