X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_password-methods.inc;h=2755134f11c15115fe7420b9ffada04b9da1afc6;hb=a5c0d9327949c29b1ae24d5f65e2eaabf27af2d1;hp=d633749fcaff450f27a23fb13e2b245595157571;hpb=889ecad35a732ed292aeace6bd3b1f52d157c4ba;p=gosa.git diff --git a/include/class_password-methods.inc b/include/class_password-methods.inc index d633749fc..2755134f1 100644 --- a/include/class_password-methods.inc +++ b/include/class_password-methods.inc @@ -22,6 +22,7 @@ class passwordMethod { var $config = false; + var $attrs= array(); // Konstructor function passwordMethod($config) @@ -95,11 +96,14 @@ function change_password ($dn, $password, $mode=0, $hash= "") $newpass= ""; // Get all available encryption Methods - $available = passwordMethod::get_available_methods(); + + // NON STATIC CALL :) + $tmp = new passwordMethod($_SESSION['config']); + $available = $tmp->get_available_methods(); // read current password entry for $dn, to detect the encryption Method $ldap = $config->get_ldap_link(); - $ldap->cat ($dn); + $ldap->cat ($dn, array("shadowLastChange", "userPassword", "uid")); $attrs = $ldap->fetch (); // Set encryption type to clear if required @@ -121,6 +125,7 @@ function change_password ($dn, $password, $mode=0, $hash= "") // Crypt with the detected Method $test = new $available[$hash]($config); + $test->attrs= $attrs; $newpass = $test->generate_hash($password); } else {