index 7c00dccdeed159db862e2853bdf8c00a0e9bfa8d..2755134f11c15115fe7420b9ffada04b9da1afc6 100644 (file)
class passwordMethod
{
var $config = false;
+ var $attrs= array();
// Konstructor
function passwordMethod($config)
// Get all available encryption Methods
- // STATIC : :(
- // $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
// Crypt with the detected Method
$test = new $available[$hash]($config);
+ $test->attrs= $attrs;
$newpass = $test->generate_hash($password);
} else {