Code

Removed show_ldap_error() calls
[gosa.git] / gosa-plugins / phpgw / personal / connectivity / phpgw / class_phpgwAccount.inc
index 0e2ac36b1fd0d4ce411b765d16b3e72617fed403..51d11f79844076a958bd5853645f3a802d02b7c3 100644 (file)
@@ -81,7 +81,9 @@ class phpgwAccount extends plugin
       $this->cleanup();
       $ldap->modify ($this->attrs); 
 
-      show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPgw account with dn '%s' failed."),$this->dn));
+      if (!$ldap->success()){
+        msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+      }
 
       new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
 
@@ -135,7 +137,9 @@ class phpgwAccount extends plugin
       new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }
 
-    show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PHPgw account with dn '%s' failed."),$this->dn));
+    if (!$ldap->success()){
+      msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+    }
 
     /* Optionally execute a command after we're done */
     if ($this->initially_was_account == $this->is_account){