calling the changepassword hook when password are changed by the user

This commit is contained in:
Ralf Becker 2006-06-09 00:09:05 +00:00
parent d8d93ebd77
commit 21cf2cf00e

View File

@ -31,7 +31,17 @@
function changepass($old,$new) 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') function list_methods($_type='xmlrpc')