From a0cb6455b7dfb51a937c24d043fabb4f31272629 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 31 May 2005 17:31:22 +0000 Subject: [PATCH] Fixes for password setting methods that call unused object git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@566 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_password-methods.inc | 4 ---- plugins/admin/systems/class_systemManagement.inc | 6 ++++-- plugins/admin/users/class_userManagement.inc | 6 ++++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/class_password-methods.inc b/include/class_password-methods.inc index 023f1d448..6dbe020da 100644 --- a/include/class_password-methods.inc +++ b/include/class_password-methods.inc @@ -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 != ""){ diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index 7962a9db1..4020c6b1a 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -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']); } diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index b5f7b2c55..500096507 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -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= ""; -- 2.30.2