From 21cf2cf00e227a52e5ddf63c99123d9749ffab16 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 9 Jun 2006 00:09:05 +0000 Subject: [PATCH] calling the changepassword hook when password are changed by the user --- preferences/inc/class.bopassword.inc.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/preferences/inc/class.bopassword.inc.php b/preferences/inc/class.bopassword.inc.php index fa7ba7becb..8ff2c9dd54 100644 --- a/preferences/inc/class.bopassword.inc.php +++ b/preferences/inc/class.bopassword.inc.php @@ -31,7 +31,17 @@ function changepass($old,$new) { - return $GLOBALS['egw']->auth->change_password($old, $new); + if (($ret = $GLOBALS['egw']->auth->change_password($old, $new))) + { + $GLOBALS['hook_values']['account_id'] = $GLOBALS['egw_info']['user']['account_id']; + $GLOBALS['hook_values']['old_passwd'] = $old; + $GLOBALS['hook_values']['new_passwd'] = $new; + + $GLOBALS['egw']->hooks->process($GLOBALS['hook_values']+array( + 'location' => 'changepassword' + ),False,True); // called for every app now, not only enabled ones) + } + return $ret; } function list_methods($_type='xmlrpc')