From 1e4bb015cd11cee39ecc25bb7617edb33acdd809 Mon Sep 17 00:00:00 2001 From: alec Date: Tue, 9 Aug 2011 15:57:25 +0000 Subject: - Added 'password_change' hook for plugin actions after successful password change git-svn-id: https://svn.roundcube.net/trunk@5036 208e9e7b-5314-0410-a742-e7e81cd9613c --- plugins/password/package.xml | 1 + plugins/password/password.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/password/package.xml b/plugins/password/package.xml index 28f82a43d..a4f74c192 100644 --- a/plugins/password/package.xml +++ b/plugins/password/package.xml @@ -29,6 +29,7 @@ - When old and new passwords are the same, do nothing, return success (#1487823) - Fixed Samba password hashing in 'ldap' driver +- Added 'password_change' hook for plugin actions after successful password change diff --git a/plugins/password/password.php b/plugins/password/password.php index c79f55ef2..b1c7863fc 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -134,8 +134,12 @@ class password extends rcube_plugin else if (!($res = $this->_save($curpwd, $newpwd))) { $rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation'); + // allow additional actions after password change (e.g. reset some backends) + $plugin = $rcmail->plugins->exec_hook('password_change', array( + 'old_pass' => $curpwd, 'new_pass' => $newpwd)); + // Reset session password - $_SESSION['password'] = $rcmail->encrypt($newpwd); + $_SESSION['password'] = $rcmail->encrypt($plugin['new_pass']); // Log password change if ($rcmail->config->get('password_log')) { -- cgit v1.2.3