RELEASE 1.0.1

This commit is contained in:
Deon George
2009-06-30 20:40:33 +10:00
parent eccabca011
commit 5f261ded38
18 changed files with 326 additions and 261 deletions

View File

@@ -1,5 +1,5 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/update_confirm.php,v 1.46 2006/01/29 01:51:49 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/update_confirm.php,v 1.47 2006/05/13 12:52:26 wurley Exp $
/**
* Takes the results of clicking "Save" in template_engine.php and determines which
@@ -76,16 +76,21 @@ foreach ($old_values as $attr => $old_val) {
}
# Check user password with new encoding.
if (isset($new_values['userpassword']) && is_array($new_values['userpassword']))
if (isset($new_values['userpassword']) && is_array($new_values['userpassword'])) {
foreach ($new_values['userpassword'] as $key => $userpassword) {
if ($userpassword) {
$new_val[$key] = password_hash($userpassword,$_POST['enc_type'][$key]);
if ($old_values['userpassword'][$key] == $new_values['userpassword'][$key] &&
get_enc_type($old_values['userpassword'][$key]) == $_POST['enc_type'][$key])
continue;
if ($new_val[$key] != $old_values['userpassword'][$key])
$update_array['userpassword'][$key] = $new_val[$key];
$new_values['userpassword'][$key] = password_hash($userpassword,$_POST['enc_type'][$key]);
}
}
if ($old_values['userpassword'] != $new_values['userpassword'])
$update_array['userpassword'] = $new_values['userpassword'];
}
# strip empty vals from update_array and ensure consecutive indices for each attribute
foreach ($update_array as $attr => $val) {
if (is_array($val)) {