Code

Updated user generic
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Apr 2008 06:56:16 +0000 (06:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Apr 2008 06:56:16 +0000 (06:56 +0000)
-Remove from parent: Only call "passwordMethod::remove_from_parent" if detected method is a valid class.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10216 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/generic/class_user.inc

index 6a477b9da32c9c40cca99f638f871f843c33a98a..15ab39c97d6b16a3e60901ed14d8ee106698e8d5 100644 (file)
@@ -674,8 +674,12 @@ class user extends plugin
   {
     /* Remove password extension */
     $temp= passwordMethod::get_available_methods();
-    $this->pwObject= new $temp[$this->pw_storage]($this->config,$this->dn);
-    $this->pwObject->remove_from_parent();
+
+    /* Remove password method from user account */
+    if(isset($temp[$this->pw_storage]) && class_available($temp[$this->pw_storage])){
+      $this->pwObject= new $temp[$this->pw_storage]($this->config,$this->dn);
+      $this->pwObject->remove_from_parent();
+    }
 
     /* Remove user */
     $ldap= $this->config->get_ldap_link();