From 0a879601e0d021e9f3896bdfc80884e5336b4c81 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 9 Sep 2010 08:52:59 +0000 Subject: [PATCH] Updated password change -Fixed event parameter list git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19579 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index de42b7ff8..4d5115640 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -3072,9 +3072,18 @@ function change_password ($dn, $password, $mode=FALSE, $hash= "", $old_password $attrs['userPassword']= $newpass; // Prepare prevent hook call - $attrsEvent = $attrs; + $attrsEvent = array(); + foreach($initialAttrs as $name => $value){ + if(!is_numeric($name)) + $attrsEvent[$name] = escapeshellarg($value[0]); + } + $attrsEvent['dn'] = escapeshellarg($initialAttrs['dn']); + foreach($attrs as $name => $value){ + $attrsEvent[$name] = escapeshellarg($value); + } $attrsEvent['current_password'] = escapeshellarg($old_password); $attrsEvent['new_password'] = escapeshellarg($password); + $passwordPlugin = new password($config,$dn); plugin::callHook($passwordPlugin, 'PREMODIFY', $attrsEvent, $output,$retCode,$error, $directlyPrintError = FALSE); if($retCode === 0 && count($output)){ -- 2.30.2