Code

Fixes for password setting methods that call unused object
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 17:31:22 +0000 (17:31 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 17:31:22 +0000 (17:31 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@566 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_password-methods.inc
plugins/admin/systems/class_systemManagement.inc
plugins/admin/users/class_userManagement.inc

index 023f1d4488ee569b306f83e7687a93161d464706..6dbe020daf4a35124a00e749fca7687b66aedaa2 100644 (file)
@@ -95,11 +95,9 @@ function change_password ($dn, $password, $mode=0, $hash= "")
   global $config;
   $newpass= "";
 
-
   // Get all available encryption Methods 
   $available = passwordMethod::get_available_methods();
 
-
   // read current password entry for $dn, to detect the encryption Method
   $ldap       = $config->get_ldap_link();
   $ldap->cat ($dn);
@@ -110,8 +108,6 @@ function change_password ($dn, $password, $mode=0, $hash= "")
     $hash= "clear";
   }
 
-
-
   // Detect the encryption Method
   if ( (isset($attrs['userPassword'][0]) &&  preg_match ("/^{([^}]+)}(.+)/", $attrs['userPassword'][0], $matches)) ||  $hash != ""){
 
index 7962a9db167d6dd981e5541d93bea55255252f65..4020c6b1a04479b59e130a69fef1a6be6b3a1ff9 100644 (file)
@@ -422,8 +422,10 @@ class systems extends plugin
 
     /* Cancel dialogs */
     if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
-      del_lock ($this->systab->dn);
-      unset ($this->systab);
+      if (isset($this->systab)){
+        del_lock ($this->systab->dn);
+        unset ($this->systab);
+      }
       $this->systab= NULL;
       unset($_SESSION['objectinfo']);
     }
index b5f7b2c55d88fea75cc023a41bcbf8e3a72d0f3f..50009650714d8e5935f91e27039fe4f8669e1bb3 100644 (file)
@@ -124,8 +124,10 @@ class userManagement extends plugin
 
     /* Reset requested? */
     if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
-      del_lock ($this->usertab->dn);
-      unset ($this->usertab);
+      if (isset($this->usertab)){
+        del_lock ($this->usertab->dn);
+        unset ($this->usertab);
+      }
       $this->usertab= NULL;
       $this->lognames= array();;
       $this->sn= "";